@dsivd/prestations-ng 18.8.0-beta.13 → 19.0.0-beta-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +12 -21
- package/ANGULAR_SIGNALS.md +850 -0
- package/CHANGELOG.md +366 -312
- package/COMPONENTS.md +350 -0
- package/CONTRIBUTING.md +8 -19
- package/ESLINT_MIGRATION_GUIDE.md +64 -67
- package/IAM_ACV_MIGRATION_OIDC.md +138 -0
- package/MULTI_ETAPES.md +1 -1
- package/README.md +5 -2
- package/UPGRADING_V12.md +0 -10
- package/UPGRADING_V16.md +0 -1
- package/UPGRADING_V18.md +398 -233
- package/UPGRADING_V19.md +1405 -0
- package/dsivd-prestations-ng-19.0.0-beta-9.tgz +0 -0
- package/fesm2022/dsivd-prestations-ng.mjs +9238 -10390
- package/fesm2022/dsivd-prestations-ng.mjs.map +1 -1
- package/index.html +1 -1
- package/package.json +19 -18
- package/schematics/package.json +3 -0
- package/schematics/utility/add-allow-synthetic-default-imports.js +2 -2
- package/schematics/utility/add-allowed-common-js-dependencies.js +3 -3
- package/schematics/utility/foehn2-bootstrap5-migration.js +21 -21
- package/schematics/utility/migrate-to-karma-coverage.js +2 -2
- package/schematics/utility/remove-emit-decorator-metadata.js +2 -2
- package/types/dsivd-prestations-ng.d.ts +3698 -0
- package/MODULES.md +0 -371
- package/abstract-page-component.d.ts +0 -57
- package/directives/currency-formatter.directive.d.ts +0 -20
- package/directives/formatter.module.d.ts +0 -11
- package/directives/iban-formatter.directive.d.ts +0 -10
- package/directives/ide-formatter.directive.d.ts +0 -17
- package/directives/ndc-formatter.directive.d.ts +0 -24
- package/dsivd-prestations-ng-18.8.0-beta.13.tgz +0 -0
- package/foehn-address/address.type.d.ts +0 -27
- package/foehn-address/foehn-address.module.d.ts +0 -15
- package/foehn-address/foehn-display-address.component.d.ts +0 -16
- package/foehn-address/foehn-input-address.component.d.ts +0 -107
- package/foehn-address/foehn-input-foreign-locality.component.d.ts +0 -16
- package/foehn-address/foehn-input-foreign-street.component.d.ts +0 -12
- package/foehn-agenda/calendar.type.d.ts +0 -9
- package/foehn-agenda/current-week.type.d.ts +0 -5
- package/foehn-agenda/day-slots.type.d.ts +0 -5
- package/foehn-agenda/foehn-agenda-navigation/foehn-agenda-navigation.component.d.ts +0 -21
- package/foehn-agenda/foehn-agenda-timeslot-panel/foehn-agenda-timeslot-panel.component.d.ts +0 -51
- package/foehn-agenda/foehn-agenda.component.d.ts +0 -29
- package/foehn-agenda/foehn-agenda.module.d.ts +0 -17
- package/foehn-agenda/pagination-week.type.d.ts +0 -5
- package/foehn-agenda/selected-slot.type.d.ts +0 -7
- package/foehn-autocomplete/foehn-autocomplete.component.d.ts +0 -126
- package/foehn-autocomplete/foehn-autocomplete.module.d.ts +0 -13
- package/foehn-boolean/foehn-boolean-checkbox.component.d.ts +0 -6
- package/foehn-boolean/foehn-boolean-radio.component.d.ts +0 -9
- package/foehn-boolean/foehn-boolean.module.d.ts +0 -12
- package/foehn-breadcrumb/breadcrumb-event.service.d.ts +0 -48
- package/foehn-breadcrumb/breadcrumb.d.ts +0 -19
- package/foehn-breadcrumb/foehn-breadcrumb.component.d.ts +0 -30
- package/foehn-breadcrumb/foehn-breadcrumb.module.d.ts +0 -10
- package/foehn-checkables/foehn-checkable-group.component.d.ts +0 -64
- package/foehn-checkables/foehn-checkables.module.d.ts +0 -17
- package/foehn-checkables/foehn-checkbox.component.d.ts +0 -9
- package/foehn-checkables/foehn-radio.component.d.ts +0 -12
- package/foehn-checkables/foehn-select.component.d.ts +0 -22
- package/foehn-checkables/form-select-option-group.d.ts +0 -4
- package/foehn-checkables/form-select-option.d.ts +0 -5
- package/foehn-confirm-modal/foehn-confirm-modal-content.d.ts +0 -9
- package/foehn-confirm-modal/foehn-confirm-modal.component.d.ts +0 -17
- package/foehn-confirm-modal/foehn-confirm-modal.module.d.ts +0 -9
- package/foehn-confirm-modal/foehn-confirm-modal.service.d.ts +0 -18
- package/foehn-date-picker/date-picker-navigation.helper.d.ts +0 -26
- package/foehn-date-picker/date-picker.helper.d.ts +0 -30
- package/foehn-date-picker/day-month.type.d.ts +0 -8
- package/foehn-date-picker/focused-day.type.d.ts +0 -6
- package/foehn-date-picker/foehn-date-picker.component.d.ts +0 -78
- package/foehn-date-picker/foehn-date-picker.module.d.ts +0 -13
- package/foehn-date-picker/month-year.type.d.ts +0 -4
- package/foehn-date-picker-button/foehn-date-picker-button.component.d.ts +0 -31
- package/foehn-date-picker-button/foehn-date-picker-button.module.d.ts +0 -12
- package/foehn-debug-summary/foehn-debug-summary.component.d.ts +0 -21
- package/foehn-debug-summary/foehn-debug-summary.component.module.d.ts +0 -9
- package/foehn-decision-electronique/foehn-decision-electronique.component.d.ts +0 -11
- package/foehn-decision-electronique/foehn-decision-electronique.module.d.ts +0 -11
- package/foehn-dropdown-menu/dropdown-menu-group.type.d.ts +0 -5
- package/foehn-dropdown-menu/dropdown-menu-item.type.d.ts +0 -9
- package/foehn-dropdown-menu/foehn-dropdown-menu.component.d.ts +0 -42
- package/foehn-dropdown-menu/foehn-dropdown-menu.module.d.ts +0 -11
- package/foehn-feedback-notification/foehn-feedback-notification.component.d.ts +0 -32
- package/foehn-feedback-notification/foehn-feedback-notification.module.d.ts +0 -11
- package/foehn-feedback-notification/foehn-feedback-notification.type.d.ts +0 -8
- package/foehn-footer/foehn-footer.component.d.ts +0 -44
- package/foehn-footer/foehn-footer.module.d.ts +0 -9
- package/foehn-footer/footer-link.type.d.ts +0 -4
- package/foehn-form/foehn-form.component.d.ts +0 -27
- package/foehn-form/foehn-form.module.d.ts +0 -10
- package/foehn-form/register-ng-model.service.d.ts +0 -9
- package/foehn-growl/foehn-growl.component.d.ts +0 -17
- package/foehn-growl/foehn-growl.module.d.ts +0 -8
- package/foehn-growl/growl-broker.service.d.ts +0 -12
- package/foehn-growl/growl-message.d.ts +0 -7
- package/foehn-growl/growl-types.d.ts +0 -6
- package/foehn-header/foehn-header.component.d.ts +0 -47
- package/foehn-header/foehn-header.module.d.ts +0 -14
- package/foehn-header/foehn-skip-link.component.d.ts +0 -23
- package/foehn-help-modal/foehn-help-modal.component.d.ts +0 -17
- package/foehn-help-modal/foehn-help-modal.module.d.ts +0 -10
- package/foehn-help-modal/foehn-help-modal.type.d.ts +0 -13
- package/foehn-icons/abstract-icon-component.d.ts +0 -9
- package/foehn-icons/foehn-icon-calendar.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-check-square-o.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-check.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-chevron-down.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-chevron-left.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-chevron-right.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-chevron-up.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-clock.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-comment-dots.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-edit.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-external-link-alt.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-file-pdf.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-info-circle.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-lock.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-map-marker.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-minus-circle.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-pencil.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-plus-circle.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-plus-square.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-search.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-times.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-trash-alt.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-unlock-alt.component.d.ts +0 -8
- package/foehn-icons/foehn-icon-user.component.d.ts +0 -8
- package/foehn-icons/foehn-icons.module.d.ts +0 -31
- package/foehn-input/foehn-input-email.component.d.ts +0 -15
- package/foehn-input/foehn-input-hidden.component.d.ts +0 -14
- package/foehn-input/foehn-input-number.component.d.ts +0 -42
- package/foehn-input/foehn-input-password.component.d.ts +0 -12
- package/foehn-input/foehn-input-phone.component.d.ts +0 -25
- package/foehn-input/foehn-input-prefixed-text.component.d.ts +0 -26
- package/foehn-input/foehn-input-string.component.d.ts +0 -9
- package/foehn-input/foehn-input-text.component.d.ts +0 -11
- package/foehn-input/foehn-input-textarea.component.d.ts +0 -22
- package/foehn-input/foehn-input.component.d.ts +0 -127
- package/foehn-input/foehn-input.module.d.ts +0 -24
- package/foehn-input/pattern.const.d.ts +0 -11
- package/foehn-input-date/foehn-input-date.component.d.ts +0 -33
- package/foehn-input-date-time/foehn-input-date-time.component.d.ts +0 -40
- package/foehn-input-time/foehn-input-time.component.d.ts +0 -19
- package/foehn-list/foehn-list.component.d.ts +0 -27
- package/foehn-list/foehn-list.module.d.ts +0 -9
- package/foehn-list/page-change-event.d.ts +0 -5
- package/foehn-menu-prestation/abstract-list-item-detail-page.component.d.ts +0 -35
- package/foehn-menu-prestation/abstract-menu-page.component.d.ts +0 -13
- package/foehn-menu-prestation/abstract-page-from-menu.component.d.ts +0 -20
- package/foehn-menu-prestation/foehn-error-pill/foehn-error-pill.component.d.ts +0 -12
- package/foehn-menu-prestation/foehn-list-summary/foehn-list-item-description.d.ts +0 -6
- package/foehn-menu-prestation/foehn-list-summary/foehn-list-item.d.ts +0 -5
- package/foehn-menu-prestation/foehn-list-summary/foehn-list-summary.component.d.ts +0 -40
- package/foehn-menu-prestation/foehn-menu-items/foehn-menu-item/foehn-menu-item.component.d.ts +0 -16
- package/foehn-menu-prestation/foehn-menu-items/foehn-menu-item-transmit/foehn-menu-item-transmit.component.d.ts +0 -23
- package/foehn-menu-prestation/foehn-menu-prestation.module.d.ts +0 -18
- package/foehn-misc/foehn-abbr.component.d.ts +0 -7
- package/foehn-misc/foehn-misc.module.d.ts +0 -7
- package/foehn-modal/foehn-modal.component.d.ts +0 -24
- package/foehn-modal/foehn-modal.module.d.ts +0 -11
- package/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.d.ts +0 -54
- package/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.module.d.ts +0 -13
- package/foehn-nav13/foehn-input-nav13.component.d.ts +0 -20
- package/foehn-nav13/foehn-input-nav13.module.d.ts +0 -11
- package/foehn-navigation/abstract-foehn-navigation.component.d.ts +0 -19
- package/foehn-navigation/foehn-navigation/foehn-navigation.component.d.ts +0 -22
- package/foehn-navigation/foehn-navigation.module.d.ts +0 -13
- package/foehn-navigation/foehn-navigation.service.d.ts +0 -69
- package/foehn-navigation/foehn-simple-navigation/foehn-simple-navigation.component.d.ts +0 -8
- package/foehn-notfound/foehn-notfound.component.d.ts +0 -19
- package/foehn-notfound/foehn-notfound.module.d.ts +0 -10
- package/foehn-page/foehn-page-counter.component.d.ts +0 -15
- package/foehn-page/foehn-page-expiration-timer/current-session-expiration.d.ts +0 -5
- package/foehn-page/foehn-page-expiration-timer/demande-expiration-interceptor.d.ts +0 -15
- package/foehn-page/foehn-page-expiration-timer/demande-expiration.service.d.ts +0 -16
- package/foehn-page/foehn-page-expiration-timer/foehn-page-expiration-timer.component.d.ts +0 -36
- package/foehn-page/foehn-page-expiration-timer/interval.helper.d.ts +0 -3
- package/foehn-page/foehn-page-modal.component.d.ts +0 -23
- package/foehn-page/foehn-page-modal.service.d.ts +0 -12
- package/foehn-page/foehn-page.component.d.ts +0 -80
- package/foehn-page/foehn-page.module.d.ts +0 -24
- package/foehn-page/foehn-page.service.d.ts +0 -19
- package/foehn-page/foehn-transmit-waiting-modal/demande-transmit-interceptor.d.ts +0 -16
- package/foehn-page/foehn-transmit-waiting-modal/foehn-transmit-waiting-modal.component.d.ts +0 -11
- package/foehn-page/foehn-transmit-waiting-modal/foehn-transmit-waiting-modal.service.d.ts +0 -11
- package/foehn-recap-section/foehn-recap-section.component.d.ts +0 -21
- package/foehn-recap-section/foehn-recap-section.module.d.ts +0 -10
- package/foehn-recap-section/foehn-recap-section.type.d.ts +0 -17
- package/foehn-remaining-alerts-summary/foehn-remaining-alerts-summary.component.d.ts +0 -20
- package/foehn-remaining-alerts-summary/foehn-remaining-alerts-summary.module.d.ts +0 -8
- package/foehn-status-progress-bar/foehn-status-progress-bar.component.d.ts +0 -23
- package/foehn-status-progress-bar/foehn-status-progress-bar.module.d.ts +0 -10
- package/foehn-table/foehn-table-column-configuration.d.ts +0 -14
- package/foehn-table/foehn-table-page-change-event.d.ts +0 -5
- package/foehn-table/foehn-table.component.d.ts +0 -40
- package/foehn-table/foehn-table.module.d.ts +0 -13
- package/foehn-table/row-element.type.d.ts +0 -4
- package/foehn-table/tableSort.d.ts +0 -4
- package/foehn-upload/abstract-foehn-uploader.component.d.ts +0 -68
- package/foehn-upload/document-reference.d.ts +0 -12
- package/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.d.ts +0 -27
- package/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.type.d.ts +0 -11
- package/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.d.ts +0 -38
- package/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.module.d.ts +0 -13
- package/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.d.ts +0 -42
- package/foehn-upload/foehn-multi-upload/foehn-multi-upload.module.d.ts +0 -13
- package/foehn-upload/foehn-multi-upload/multi-upload.service.d.ts +0 -29
- package/foehn-upload/foehn-multi-upload/multi-upload.type.d.ts +0 -11
- package/foehn-upload/foehn-multi-upload/pending-upload.service.d.ts +0 -26
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.d.ts +0 -38
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.module.d.ts +0 -14
- package/foehn-upload/foehn-upload-progress-bar/foehn-upload-progress-bar.component.d.ts +0 -22
- package/foehn-upload/foehn-upload-progress-bar/foehn-upload-progress-bar.module.d.ts +0 -11
- package/foehn-upload/foehn-upload-progress-bar/upload-progress.service.d.ts +0 -19
- package/foehn-upload/foehn-upload-progress-bar/upload-progress.type.d.ts +0 -6
- package/foehn-upload/page-upload-limit.service.d.ts +0 -22
- package/foehn-upload/pending-upload.type.d.ts +0 -9
- package/foehn-upload/uploader.helper.d.ts +0 -66
- package/foehn-user-connected-as/foehn-user-connected-as.component.d.ts +0 -12
- package/foehn-user-connected-as/foehn-user-connected-as.module.d.ts +0 -9
- package/foehn-validation-alert-summary/foehn-validation-alert-summary.component.d.ts +0 -20
- package/foehn-validation-alert-summary/foehn-validation-alert-summary.module.d.ts +0 -9
- package/foehn-validation-alerts/foehn-validation-alerts.component.d.ts +0 -14
- package/foehn-validation-alerts/foehn-validation-alerts.module.d.ts +0 -8
- package/form-error.d.ts +0 -5
- package/form-post-response.d.ts +0 -19
- package/gesdem/gesdem-error-handler.service.d.ts +0 -22
- package/gesdem/gesdem-event.service.d.ts +0 -16
- package/gesdem/gesdem-handler.service.d.ts +0 -52
- package/gesdem/gesdem-loader.guard.d.ts +0 -2
- package/gesdem/gesdem-statut-utils.d.ts +0 -12
- package/gesdem-action-recovery/gesdem-action-recovery-login/gesdem-action-recovery-login.component.d.ts +0 -39
- package/gesdem-action-recovery/gesdem-action-recovery-registration/gesdem-action-recovery-registration.component.d.ts +0 -59
- package/gesdem-action-recovery/gesdem-action-recovery.module.d.ts +0 -17
- package/gesdem-action-recovery/gesdem-action-recovery.service.d.ts +0 -24
- package/gesdem-action-recovery/reprise-info.d.ts +0 -6
- package/gesdem-confirmation/gesdem-confirmation.component.d.ts +0 -65
- package/gesdem-confirmation/gesdem-confirmation.module.d.ts +0 -12
- package/gesdem-error/gesdem-error.component.d.ts +0 -34
- package/gesdem-error/gesdem-error.module.d.ts +0 -12
- package/global.const.d.ts +0 -1
- package/helpers/demande.helper.d.ts +0 -3
- package/helpers/object.helper.d.ts +0 -30
- package/i18n-form.d.ts +0 -5
- package/index.d.ts +0 -5
- package/pipes/currency.pipe.d.ts +0 -10
- package/pipes/date.pipe.d.ts +0 -12
- package/pipes/formatIde.pipe.d.ts +0 -7
- package/pipes/pipes.module.d.ts +0 -9
- package/prestations-ng-core.module.d.ts +0 -12
- package/public-api.d.ts +0 -238
- package/refinf/model/address-type-light.d.ts +0 -5
- package/refinf/model/canton.d.ts +0 -4
- package/refinf/model/district.d.ts +0 -7
- package/refinf/model/municipality.d.ts +0 -9
- package/refinf/model/place-of-origin.d.ts +0 -9
- package/refinf/model/postal-locality.d.ts +0 -11
- package/sdk-appinfo/application-info.d.ts +0 -61
- package/sdk-appinfo/application-info.service.d.ts +0 -32
- package/sdk-currency/currency.helper.d.ts +0 -9
- package/sdk-date/date.helper.d.ts +0 -20
- package/sdk-dictionary/default-dictionary.d.ts +0 -2
- package/sdk-dictionary/sdk-dictionary.module.d.ts +0 -7
- package/sdk-dictionary/sdk-dictionary.pipe.d.ts +0 -12
- package/sdk-dictionary/sdk-dictionary.service.d.ts +0 -44
- package/sdk-drafts/draft.model.d.ts +0 -5
- package/sdk-drafts/drafts-container.component.d.ts +0 -33
- package/sdk-drafts/drafts.module.d.ts +0 -14
- package/sdk-drafts/drafts.service.d.ts +0 -20
- package/sdk-epayment/model/EPaymentParameters.d.ts +0 -21
- package/sdk-epayment/pending-payment/pending-payment.component.d.ts +0 -9
- package/sdk-epayment/sdk-epayment.component.d.ts +0 -33
- package/sdk-epayment/sdk-epayment.module.d.ts +0 -11
- package/sdk-epayment/sdk-epayment.service.d.ts +0 -21
- package/sdk-events-logger/sdk-event-type.d.ts +0 -12
- package/sdk-events-logger/sdk-event.d.ts +0 -8
- package/sdk-events-logger/sdk-events-logger.service.d.ts +0 -18
- package/sdk-recaptcha/grecaptcha/grecaptcha.component.d.ts +0 -39
- package/sdk-recaptcha/recaptcha.service.d.ts +0 -44
- package/sdk-recaptcha/sdk-recaptcha.component.d.ts +0 -27
- package/sdk-recaptcha/sdk-recaptcha.module.d.ts +0 -9
- package/sdk-redirect/iam-expired-interceptor.service.d.ts +0 -12
- package/sdk-redirect/redirect.component.d.ts +0 -22
- package/sdk-redirect/sdk-redirect.module.d.ts +0 -9
- package/sdk-session-info/session-info-data.d.ts +0 -29
- package/sdk-session-info/session-info-with-application.service.d.ts +0 -20
- package/sdk-session-info/session-info.service.d.ts +0 -17
- package/sdk-statistics/sdk-statistics.service.d.ts +0 -24
- package/sdk-support-alert/support-alert-container.component.d.ts +0 -20
- package/sdk-support-alert/support-alert.component.d.ts +0 -12
- package/sdk-support-alert/support-alert.model.d.ts +0 -12
- package/sdk-support-alert/support-alert.module.d.ts +0 -10
- package/sdk-support-alert/support-alert.service.d.ts +0 -34
- package/service-locator.d.ts +0 -4
- package/supported-browser.d.ts +0 -1
- package/validation/validation-handler.service.d.ts +0 -15
package/UPGRADING_V18.md
CHANGED
|
@@ -1,9 +1,391 @@
|
|
|
1
1
|
# PRESTAKIT : Upgrading from v17 to v18
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
To migrate your project from `prestakit` v17 to v18, you need to migrate prestations-ng and prestations-be, as usual.
|
|
4
|
+
But to migrate to prestations-be v18, you need to migrate your project to spring boot 3 / java 21. And to be able to do
|
|
5
|
+
that, you need to migrate your project to openshift.
|
|
6
|
+
|
|
7
|
+
Let's start by migrating to openshift / spring boot 3 / prestations-be v18.
|
|
8
|
+
|
|
9
|
+
## Prequisites
|
|
10
|
+
|
|
11
|
+
### Mise à jour du darch
|
|
12
|
+
|
|
13
|
+
- Pour ce qui doit aller hors d'un namespace existant : Le GA met à jour, ou fait mettre à jour le **DARCH** (Ouvrir un Jira sur le
|
|
14
|
+
modèle de "[ARCH-1120](https://issuetracker.etat-de-vaud.ch/outils/issuetracker/browse/ARCH-1120) - ClearPass Enroll, migration
|
|
15
|
+
openshift - Mise à jour DARCH" pour demander un accompagnement et pour savoir qui sera le point de contact) afin de relocaliser
|
|
16
|
+
l'applicatif dans openshift. Il met également à jour (ou s'assure que c'est fait par un architecte technique) la **matrice des flux**.
|
|
17
|
+
(exemple de matrice, lien Fred : [ClearpassEnroll - Matrice des flux.xlsx](fred://930d2fd4-4be5-4f70-9dec-5d1e8ba13851/browse/id/workspace/SpacesStore/573a7cda-9507-46e0-9dbc-7dfdb3b4cedc))
|
|
18
|
+
|
|
19
|
+
### Demande de namespace (Back-office ou pas de pool d'application existant pour l'équipe de déploiement)
|
|
20
|
+
|
|
21
|
+
- Demander un namespace visible dans tesserakt (ex : https://portail.etat-de-vaud.ch/outils/tesserakt/namespace-groups/146420/),
|
|
22
|
+
Easyvista → Nouveau changement → WEB → 030 - Création d'un nouvel environnement WEB (IIS, Apache, Tomcat...), pour chaque environnement
|
|
23
|
+
- Si BO, demander à ajouter la network policy "allow-from-cybercloud" au namespace (ex : R260330_00015)
|
|
24
|
+
|
|
25
|
+
### Demande de liaison à un pool d'application
|
|
26
|
+
|
|
27
|
+
- Si vous avez déjà un pool d'application pour votre équipe dans tesserakt (ex : cyberimtpublic/cyberimtsecurise), il suffit de faire une DC **030 - Création d'un nouvel environnement WEB** :
|
|
28
|
+
|
|
29
|
+
> Merci de lier la DU https://portail.etat-de-vaud.ch/outils/agref/deploy-unit/897
|
|
30
|
+
>
|
|
31
|
+
> au pool d'application "cyberimtpublic"
|
|
32
|
+
>
|
|
33
|
+
> Charts : ssh://git@bitbucket.etat-de-vaud.ch/pee/imt-charts.git / prestation
|
|
34
|
+
|
|
35
|
+
Exemple pour cyberimtpublic : R260330_00012
|
|
36
|
+
|
|
37
|
+
## PRESTATIONS-BE (via parent - Spring boot 3 / java 21)
|
|
38
|
+
|
|
39
|
+
From here on, we are in the root folder of your project, for example ~/git/cybsdk/skeleton.
|
|
40
|
+
|
|
41
|
+
### Spring boot 3
|
|
42
|
+
|
|
43
|
+
You can use this openrewrite recipe to simplify the migration (run with java 11)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
source ~/devtools/fordev.sh 11 22
|
|
47
|
+
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5 -Pnof,noft
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Fix application.properties :
|
|
51
|
+
|
|
52
|
+
```diff
|
|
53
|
+
logging.config=${ch.vd.configDir}/logback-spring.xml
|
|
54
|
+
+ # Restore sleuth traces at the same position as in spring boot 2
|
|
55
|
+
+ logging.pattern.level=%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]
|
|
56
|
+
+ # remove sleuth traces added by spring boot 3
|
|
57
|
+
+ logging.pattern.correlation=
|
|
58
|
+
+ logging.include-application-name=false
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
After that, you can switch to java 21 `jdk21` and should continue based on your current parent :
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<summary>SPRING-BOOT-STARTER-PARENT</summary>
|
|
65
|
+
|
|
66
|
+
### SPRING-BOOT-STARTER-PARENT
|
|
67
|
+
|
|
68
|
+
- remove this profile `<id>devex.in</id>` and its properties (`<devex...`)
|
|
69
|
+
- set property `java.version` to `21`
|
|
70
|
+
- set property `build.nofront` to `false`
|
|
71
|
+
- set property `skipTests` to `false`
|
|
72
|
+
- set property `commons-lang3.version` to `3.17.0`
|
|
73
|
+
- set property `commons-io.version` to `2.19.0`
|
|
74
|
+
- set property `commons-text.version` to `1.13.1`
|
|
75
|
+
- set property `prestations-be.version` to `18.x.y`
|
|
76
|
+
- remove plugin `maven-assembly-plugin` and its properties (`<assembly.xxx`)
|
|
77
|
+
- remove dependency `spring-cloud-starter-netflix-eureka-client`
|
|
78
|
+
- remove dependency `javax.el` and its property (`<javax.el.version>`)
|
|
79
|
+
|
|
80
|
+
If you used `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin`, you should replace it with `org.jvnet.jaxb:jaxb-maven-plugin`
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
<plugin>
|
|
84
|
+
<groupId>org.jvnet.jaxb</groupId>
|
|
85
|
+
<artifactId>jaxb-maven-plugin</artifactId>
|
|
86
|
+
<version>${jaxb-maven-plugin.version}</version>
|
|
87
|
+
<configuration>
|
|
88
|
+
<strict>false</strict> <!-- see https://github.com/highsource/maven-jaxb2-plugin/wiki/Catalogs-in-Strict-Mode -->
|
|
89
|
+
<schemaDirectory>${basedir}/src/main/resources/xsd/</schemaDirectory>
|
|
90
|
+
<args>
|
|
91
|
+
<arg>-extension</arg>
|
|
92
|
+
<arg>-Xvalue-constructor</arg>
|
|
93
|
+
<arg>-XsimpleEquals</arg>
|
|
94
|
+
<arg>-XsimpleHashCode</arg>
|
|
95
|
+
<arg>-Xinheritance</arg>
|
|
96
|
+
</args>
|
|
97
|
+
</configuration>
|
|
98
|
+
<executions>
|
|
99
|
+
<execution>
|
|
100
|
+
<goals>
|
|
101
|
+
<goal>generate</goal>
|
|
102
|
+
</goals>
|
|
103
|
+
<configuration>
|
|
104
|
+
<schemaIncludes>
|
|
105
|
+
<include>backoffice.xsd</include>
|
|
106
|
+
</schemaIncludes>
|
|
107
|
+
</configuration>
|
|
108
|
+
</execution>
|
|
109
|
+
</executions>
|
|
110
|
+
<dependencies>
|
|
111
|
+
<dependency>
|
|
112
|
+
<groupId>org.jvnet.jaxb</groupId>
|
|
113
|
+
<artifactId>jaxb-plugins</artifactId>
|
|
114
|
+
<version>${jaxb-plugins.version}</version>
|
|
115
|
+
</dependency>
|
|
116
|
+
<dependency>
|
|
117
|
+
<groupId>org.jvnet.jaxb2_commons</groupId>
|
|
118
|
+
<artifactId>jaxb2-namespace-prefix</artifactId>
|
|
119
|
+
<version>${jaxb2-namespace-prefix.version}</version>
|
|
120
|
+
</dependency>
|
|
121
|
+
</dependencies>
|
|
122
|
+
</plugin>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
with these properties :
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
<jaxb-maven-plugin.version>4.0.8</jaxb-maven-plugin.version>
|
|
129
|
+
<jaxb-plugins.version>3.0.0</jaxb-plugins.version>
|
|
130
|
+
<jaxb2-namespace-prefix.version>2.0</jaxb2-namespace-prefix.version>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
</details>
|
|
134
|
+
|
|
135
|
+
<details>
|
|
136
|
+
<summary>APPLICATION-PARENT (IMT-Portail)</summary>
|
|
137
|
+
|
|
138
|
+
### APPLICATION-PARENT
|
|
139
|
+
|
|
140
|
+
- set parent version to `14.x.x`, check the important changes that happened since the previous version :
|
|
141
|
+
https://dgnsiwiki.etat-de-vaud.ch/outils/dgnsiwiki/spaces/PCYBER/pages/1094779109/Correspondance+versions+prestakit+libs+cyber+changelog
|
|
142
|
+
- remove property `java.version` (already set to `21` in the parent)
|
|
143
|
+
- if existing, remove exclusion `spring-cloud-starter-netflix-eureka-client` from `starter-prestation`
|
|
144
|
+
- remove dependency `spring-boot-starter-validation` (already in `starter-prestation`)
|
|
145
|
+
- remove devex properties (devex.configTag, devex.deployTarget..)
|
|
146
|
+
|
|
147
|
+
If you used `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin`, you should replace it with `org.jvnet.jaxb:jaxb-maven-plugin`
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
<plugin>
|
|
151
|
+
<groupId>org.jvnet.jaxb</groupId>
|
|
152
|
+
<artifactId>jaxb-maven-plugin</artifactId>
|
|
153
|
+
<executions>
|
|
154
|
+
<execution>
|
|
155
|
+
<goals>
|
|
156
|
+
<goal>generate</goal>
|
|
157
|
+
</goals>
|
|
158
|
+
<configuration>
|
|
159
|
+
<schemaIncludes>
|
|
160
|
+
<include>backoffice.xsd</include>
|
|
161
|
+
</schemaIncludes>
|
|
162
|
+
</configuration>
|
|
163
|
+
</execution>
|
|
164
|
+
</executions>
|
|
165
|
+
</plugin>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
</details>
|
|
169
|
+
|
|
170
|
+
### clean / build your project
|
|
171
|
+
|
|
172
|
+
- change your application version to a new major one
|
|
173
|
+
- remove the annotation `@EnableEurekaClient`
|
|
174
|
+
- remove the property `eureka.client.enabled`
|
|
175
|
+
- remove the property `eureka.client.serviceUrl.defaultZone` (in you configuration repository)
|
|
176
|
+
- replace deprecated annotation `@MockBean` with `@MockitoBean`
|
|
177
|
+
- remove deprecated field constructor `Validator validator` from `AbstractSdkController`
|
|
178
|
+
- use `SdkControllerTest.getValidator()` instead of creating a `LocalValidatorFactoryBean` to build your `FormValidationService` in tests
|
|
179
|
+
|
|
180
|
+
build your project with java 21 :
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
mvn -U clean install -Pnof,noft
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Property migration
|
|
187
|
+
|
|
188
|
+
run your application with this dependency :
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
<dependency>
|
|
192
|
+
<groupId>org.springframework.boot</groupId>
|
|
193
|
+
<artifactId>spring-boot-properties-migrator</artifactId>
|
|
194
|
+
<scope>runtime</scope>
|
|
195
|
+
</dependency>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
look for logs that indicate property you should migrate (watch for WARN logs of class PropertiesMigrationListener), update them and remove the
|
|
199
|
+
dependency
|
|
200
|
+
|
|
201
|
+
### Captcha configuration
|
|
202
|
+
|
|
203
|
+
- As stated in the migration guide from v16 to v17, Cybercache is responsible for the captcha turnstile verify call.
|
|
204
|
+
- Therefore, you can remove properties related to this configuration :
|
|
205
|
+
- `recaptcha.byPassUUID`
|
|
206
|
+
- `recaptcha.proxyUrl`
|
|
207
|
+
- `recaptcha.proxyPort`
|
|
208
|
+
- `recaptcha.secretkey`
|
|
209
|
+
- `recaptcha.publickey`
|
|
210
|
+
- If your application was not using Refinf through property `cyber-cache.configuration.enabled=false` and you still need the Recaptcha, you can replace this property with `cyber-cache.refinf-v5.enabled=false`, remove duplicated properties as before, add `cyber-cache.base-url` in your configuration and add your deployment unit in Mizo (Cybercache) for role `user`.
|
|
211
|
+
|
|
212
|
+
Cookie storage is kept as before, therefore you can keep cookie related properties that starts with `recaptcha.cookie.YYY` in your properties.
|
|
213
|
+
|
|
214
|
+
See [Skeleton](https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton/pull-requests/708/overview) for a working example
|
|
215
|
+
|
|
216
|
+
### HIBERNATE
|
|
217
|
+
|
|
218
|
+
## Sequences
|
|
219
|
+
|
|
220
|
+
Hibernate doesn't use the default sequence anymore, you can keep using it by replacing
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
@GeneratedValue(strategy = GenerationType.SEQUENCE)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
with
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
|
|
230
|
+
@SequenceGenerator(name = "hibernate_sequence", allocationSize = 1)
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Dates mapping
|
|
234
|
+
|
|
235
|
+
replace `@Type(LocalDateTimeUserType.class)` by `@Convert(converter = LocalDateTimeConverter.class)`
|
|
236
|
+
replace `@Type(LocalDateUserType.class)` by `@Convert(converter = LocalDateConverter.class)`
|
|
237
|
+
|
|
238
|
+
## H2
|
|
239
|
+
|
|
240
|
+
- If you had a fixe H2 version for testing, you should upgrade to the latest version by removing :
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
<h2.version>1.4.200</h2.version>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
- When using protected keywords in H2 (like "VALUE") add `NON_KEYWORDS=VALUE;` to your `spring.datasource.url` such as:
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
spring.datasource.url=jdbc:h2:mem:testdb;NON_KEYWORDS=VALUE;
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## JpaExpression cast
|
|
253
|
+
|
|
254
|
+
replace `root.get(attribute).as(String.class)` by `((JpaExpression<?>) root.get(attribute)).cast(String.class)`
|
|
255
|
+
|
|
256
|
+
### Jenkins files for Unit tests
|
|
257
|
+
|
|
258
|
+
buildPipeline is not supported anymore, replace the content of jenkins>UT>JenkinsFile with :
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
@Library('devsup-library') _
|
|
262
|
+
|
|
263
|
+
buildAppPipelinePodmanUT([
|
|
264
|
+
name : 'the name of your application',
|
|
265
|
+
label : 'your slaves label',
|
|
266
|
+
jdk : '21',
|
|
267
|
+
node : '20'
|
|
268
|
+
])
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
- Example for a repo git containing both BO and FO: https://dsigit.etat-de-vaud.ch/outils/git/projects/PEE/repos/refivdparent/browse/jenkins/UT/Jenkinsfile
|
|
272
|
+
- Example for a repo git containing only one application: https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton/browse/jenkins/UT/Jenkinsfile
|
|
273
|
+
|
|
274
|
+
### Code cleanup
|
|
275
|
+
|
|
276
|
+
You can use these openrewrite recipes to clean your code :
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.testing.junit5.JUnit5BestPractices
|
|
280
|
+
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-static-analysis:RELEASE -Drewrite.activeRecipes=org.openrewrite.staticanalysis.CommonStaticAnalysis
|
|
281
|
+
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=org.openrewrite.java.RemoveUnusedImports
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Take a look at sonar to see what you can improve or ignore.
|
|
285
|
+
|
|
286
|
+
### Debugging tips
|
|
287
|
+
|
|
288
|
+
Spring boot 3 doesn't support calling a controller with a trailing slash, fix the url called (/api/ping != /api/ping**/**)
|
|
289
|
+
|
|
290
|
+
## Openshift
|
|
291
|
+
|
|
292
|
+
- Supprimer le fichier `assembly.xml`
|
|
293
|
+
- Supprimer le répertoire `addons`
|
|
294
|
+
- Supprimer le répertoire `scripts`
|
|
295
|
+
- Supprimer le répertoire `jenkins/devex`
|
|
296
|
+
- Supprimer l'annotation `@EnableDiscoveryClient` dans `Application.java`
|
|
297
|
+
- Remplacer `tomcat.port=1640` par `port.http=16400` (ou adapter le port si différent) dans les fichiers `environment.
|
|
298
|
+
properties`
|
|
299
|
+
- Remplacer `server.port=${tomcat.port}0` par `server.port=${port.http}` dans `application.properties`
|
|
300
|
+
- Adapter `pom.xml` :
|
|
301
|
+
- Modifier le packaging : `<packaging>jar</packaging>`
|
|
302
|
+
- Ajouter le finalName (sous `build`) : `<finalName>${project.artifactId}</finalName>`
|
|
303
|
+
- Ajouter les properties t6kt. 'NOM TECHNIQUE DANS AGREF' est le nom de l'application listée dans tesserakt,
|
|
304
|
+
exemple : cyberimtpublic
|
|
305
|
+
- `<t6kt-maven-plugin.application>NOM TECHNIQUE DANS AGREF</t6kt-maven-plugin.application>`
|
|
306
|
+
- `<t6kt-maven-plugin.configurationVersion>master</t6kt-maven-plugin.configurationVersion>`
|
|
307
|
+
- `<t6kt-maven-plugin.chartVersion>master</t6kt-maven-plugin.chartVersion>`
|
|
308
|
+
- `<t6kt-maven-plugin.cluster>int02 ou extint01</t6kt-maven-plugin.cluster>`
|
|
309
|
+
- Si parent `spring-boot-starter-parent`
|
|
310
|
+
- Ajouter `tesserakt-maven-plugin` :
|
|
311
|
+
- ```
|
|
312
|
+
<!-- used by snap2t6kt (https://dsigit.etat-de-vaud.ch/outils/git/projects/DEVSUP/repos/jenkins-library/browse/vars/snap2t6kt.groovy)-->
|
|
313
|
+
<plugin>
|
|
314
|
+
<groupId>ch.vd.devsupport</groupId>
|
|
315
|
+
<artifactId>tesserakt-maven-plugin</artifactId>
|
|
316
|
+
<version>${t6kt-maven-plugin.version}</version>
|
|
317
|
+
<configuration>
|
|
318
|
+
<username>${T6KT_USERNAME}</username>
|
|
319
|
+
<password>${T6KT_PASSWORD}</password>
|
|
320
|
+
<application>${t6kt-maven-plugin.application}</application>
|
|
321
|
+
<deployUnit>${t6kt-maven-plugin.deployUnit}</deployUnit>
|
|
322
|
+
<applicationVersion>${t6kt-maven-plugin.applicationVersion}</applicationVersion>
|
|
323
|
+
<chartVersion>${t6kt-maven-plugin.chartVersion}</chartVersion>
|
|
324
|
+
<configurationVersion>${t6kt-maven-plugin.configurationVersion}</configurationVersion>
|
|
325
|
+
<environment>${t6kt-maven-plugin.environment}</environment>
|
|
326
|
+
<cluster>${t6kt-maven-plugin.cluster}</cluster>
|
|
327
|
+
</configuration>
|
|
328
|
+
</plugin>
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
NB : les 2 derniers points sont valables si le code concernée n'est déployé que dans 1 DU. Au cas où il y a
|
|
332
|
+
plusieurs DU, voir exemple ici : https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBER/repos/formsupportcyber/browse/pom.xml#90-109
|
|
333
|
+
|
|
334
|
+
NB : int02 signifie "intégration 2" and "extint01" signifie "extranet intégration 1".
|
|
335
|
+
Donc si c'est pour l'intranet, c'est int02 par exemple, si c'est de l'internet, c'est extint01 par exemple.
|
|
336
|
+
|
|
337
|
+
### Move the configs (if it is a fo and it goes into an application pool like cyberimtpublic)
|
|
338
|
+
|
|
339
|
+
Move the files from your configuration repository into the target repository.
|
|
340
|
+
Example : skeleton-configuration (https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton-configuration/browse)
|
|
341
|
+
into
|
|
342
|
+
cyberimt-configuration (https://dsigit.etat-de-vaud.ch/outils/git/projects/PEE/repos/cyberimt-configuration/browse)
|
|
343
|
+
and leave a README.md file in the old repository to tell where it has been moved.
|
|
344
|
+
|
|
345
|
+
Clean the moved files by removing what is already defined in the application\*.properties files.
|
|
346
|
+
|
|
347
|
+
If you had folders by environment (IN / VA / PR) in your repo, move them into the vault folder of the target
|
|
348
|
+
repository. The subfolder name must correspond to the deployUnit name.
|
|
349
|
+
|
|
350
|
+
Define `deployUnit.groupId` et `deployUnit.name` in your moved base properties file.
|
|
351
|
+
|
|
352
|
+
In the helm folder, add a subfolder with the deployUnit name and fill it with a values.yaml file (copy-paste-replace
|
|
353
|
+
from another similar)
|
|
354
|
+
NB : if your application is using a `${ch.vd.dataDir}` that must survive a restart, your can mount a persistent
|
|
355
|
+
volume by adding `dataDirSize: 10Mi` (pick the right size) in the values.yaml file.
|
|
356
|
+
|
|
357
|
+
### Deployment of the first snapshot in IN
|
|
358
|
+
|
|
359
|
+
- **Equipe IMT-Portail** Ajouter le projet à jenkins
|
|
360
|
+
- ajouter l'application à la liste :
|
|
361
|
+
https://dsigit.etat-de-vaud.ch/outils/git/projects/PEE/repos/jenkins-libs/browse/vars/getImtPortailApplications.groovy
|
|
362
|
+
(the name must correspond with the deployUnit name)
|
|
363
|
+
- https://validation.portail.etat-de-vaud.ch/outils/jenkinsdgnsi/view/METIMT/job/000_Portail_SNAP_2t6kt/ => lancer un DRY_RUN
|
|
364
|
+
- https://validation.portail.etat-de-vaud.ch/outils/jenkinsdgnsi/view/METIMT/job/000_Portail_STABLE_2t6kt/ => lancer un DRY_RUN
|
|
365
|
+
- Supprimer l'applications des jobs "2Devex":
|
|
366
|
+
- https://validation.portail.etat-de-vaud.ch/outils/jenkinsdgnsi/view/METIMT/job/000_Portail_SNAP_2Devex/
|
|
367
|
+
- https://validation.portail.etat-de-vaud.ch/outils/jenkinsdgnsi/view/METIMT/job/000_Portail_STABLE_2Devex/
|
|
368
|
+
|
|
369
|
+
Once your changes are merged, you can launch the job to deploy the first snapshot in IN using 000_Portail_SNAP_2t6kt
|
|
370
|
+
|
|
371
|
+
Check the logs of the job to see if it is successful, and check the logs of your pod to see if it is running fine.
|
|
372
|
+
|
|
373
|
+
You can now change the access configuration of your application to use the openshift route in the configuration
|
|
374
|
+
repository (https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBER/repos/configuration/browse/cyberzuul-IN.yml)
|
|
375
|
+
for a fo. For a BO you need to make a DS to ask the WEB team to change the route. Once done and merged, restart zuul
|
|
376
|
+
(https://portail.etat-de-vaud.ch/outils/devex/deployunit-sub/1322/containers?target=EmbeddedRHEL7) and stop your old
|
|
377
|
+
application.
|
|
378
|
+
|
|
379
|
+
Create a DS to desactivate the old containers in the IN vms.
|
|
380
|
+
|
|
381
|
+
Check that your application is running fine in IN, that you can see it properly in the monitoring
|
|
382
|
+
https://validation.portail.etat-de-vaud.ch/cyberadmin/int-consolesupport/springbootadmin/wallboard and that the
|
|
383
|
+
sensitive data are not exposed in the property configuration listing.
|
|
4
384
|
|
|
5
385
|
## PRESTATIONS-NG
|
|
6
386
|
|
|
387
|
+
For the commands in this guide, it is supposed that your are in the `front` folder of your project.
|
|
388
|
+
|
|
7
389
|
The main feature in `prestations-ng` v18 is the update of the `@angular/*` peer dependencies
|
|
8
390
|
to `^19.2.14`, using `node 20+` to build, `npm 10+` for package manager and `Foehn 2+ (Bootstrap 5+)` for our design system.
|
|
9
391
|
|
|
@@ -23,6 +405,7 @@ In the next commands, commit before each ng update.
|
|
|
23
405
|
|
|
24
406
|
```bash
|
|
25
407
|
npm install
|
|
408
|
+
npm install @angular/cli@17 -g
|
|
26
409
|
ng update @angular/core@17 @angular/cli@17
|
|
27
410
|
ng update @dsivd/prestations-ng@17
|
|
28
411
|
|
|
@@ -32,26 +415,6 @@ ng update @angular/core@18 @angular/cli@18
|
|
|
32
415
|
|
|
33
416
|
When asked the question "Select the migrations that you'd like to run", accept "use-application-builder" by hitting "Space" key then "Enter".
|
|
34
417
|
|
|
35
|
-
#### Fix provideHttpClient withXsrfConfiguration
|
|
36
|
-
|
|
37
|
-
Modify your `app.module.ts` and add:
|
|
38
|
-
`{
|
|
39
|
-
cookieName: 'XSRF-TOKEN',
|
|
40
|
-
headerName: 'X-XSRF-TOKEN'
|
|
41
|
-
}`
|
|
42
|
-
to `withXsrfConfiguration()`.
|
|
43
|
-
|
|
44
|
-
```diff
|
|
45
|
-
providers: [
|
|
46
|
-
META_SERVICE_PROVIDER,
|
|
47
|
-
- provideHttpClient(withXsrfConfiguration()),
|
|
48
|
-
+ provideHttpClient(withXsrfConfiguration({
|
|
49
|
-
+ cookieName: 'XSRF-TOKEN',
|
|
50
|
-
+ headerName: 'X-XSRF-TOKEN'
|
|
51
|
-
+ })),
|
|
52
|
-
]
|
|
53
|
-
```
|
|
54
|
-
|
|
55
418
|
#### Add an empty "browser" to your output path in angular.json
|
|
56
419
|
|
|
57
420
|
```diff
|
|
@@ -163,7 +526,7 @@ In your `proxy.conf.json` file:
|
|
|
163
526
|
}
|
|
164
527
|
```
|
|
165
528
|
|
|
166
|
-
#### NgHttpLoader migration as standalone
|
|
529
|
+
#### NgHttpLoader migration as standalone + Fix provideHttpClient withXsrfConfiguration
|
|
167
530
|
|
|
168
531
|
In your `app.module.ts` file:
|
|
169
532
|
|
|
@@ -181,8 +544,14 @@ In your `app.module.ts` file:
|
|
|
181
544
|
- NgHttpLoaderModule.forRoot(),
|
|
182
545
|
+ NgHttpLoaderComponent,
|
|
183
546
|
], providers: [
|
|
184
|
-
provideHttpClient(
|
|
185
|
-
+
|
|
547
|
+
- provideHttpClient(withXsrfConfiguration()),
|
|
548
|
+
+ provideHttpClient(
|
|
549
|
+
+ withInterceptors([pendingRequestsInterceptor$]),
|
|
550
|
+
+ withXsrfConfiguration({
|
|
551
|
+
+ cookieName: 'XSRF-TOKEN',
|
|
552
|
+
+ headerName: 'X-XSRF-TOKEN'
|
|
553
|
+
+ })
|
|
554
|
+
+ ),
|
|
186
555
|
]
|
|
187
556
|
})
|
|
188
557
|
```
|
|
@@ -333,8 +702,11 @@ npm run lint
|
|
|
333
702
|
|
|
334
703
|
Fix manually all errors **Components, Directives and Pipes should not opt out of standalone @angular-eslint/prefer-standalone** by either:
|
|
335
704
|
|
|
336
|
-
-
|
|
337
|
-
|
|
705
|
+
- Adding `// eslint-disable-next-line @angular-eslint/prefer-standalone` above `standalone: false` (recommended by
|
|
706
|
+
IMT team, to focus on the current migration)
|
|
707
|
+
- Transforming your component into a `standalone` component by changing `standalone: false` into `standalone: true`
|
|
708
|
+
(recommended by angular, but implies to make a standalone migration for each component, cf
|
|
709
|
+
- https://v19.angular.dev/reference/migrations/standalone, then check that your application is compiling/running well after that)
|
|
338
710
|
|
|
339
711
|
Then run again:
|
|
340
712
|
|
|
@@ -401,210 +773,3 @@ npm run test
|
|
|
401
773
|
|
|
402
774
|
If there is a message complaining about HttpErrorResponse & NG0205: Injector has already been destroyed,
|
|
403
775
|
in your `app.component.spec.ts` file, add `HttpClientTestingModule` to `TestBed.configureTestingModule` in `beforeEach(waitForAsync` function
|
|
404
|
-
|
|
405
|
-
## PRESTATIONS-BE
|
|
406
|
-
|
|
407
|
-
From here on, we are back in the root folder of your project
|
|
408
|
-
|
|
409
|
-
### Openshift
|
|
410
|
-
|
|
411
|
-
Since spring boot 3 has a minimal jdk version of 17, you now have to deploy you application in an openshift cluster.
|
|
412
|
-
see https://dsigit.etat-de-vaud.ch/outils/git/projects/PEE/repos/imt-charts/browse/README.MD
|
|
413
|
-
|
|
414
|
-
### Spring boot 3
|
|
415
|
-
|
|
416
|
-
You can use this openrewrite recipe to simplify the migration (run with java 11)
|
|
417
|
-
|
|
418
|
-
```bash
|
|
419
|
-
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4 -Drewrite.exportDatatables=true -Pnof,noft
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
After that, you should continue based on your current parent :
|
|
423
|
-
|
|
424
|
-
### SPRING-BOOT-STARTER-PARENT
|
|
425
|
-
|
|
426
|
-
- remove this profile `<id>devex.in</id>` and its properties (`<devex*`)
|
|
427
|
-
- set property `java.version` to `21`
|
|
428
|
-
- set property `build.nofront` to `false`
|
|
429
|
-
- set property `skipTests` to `false`
|
|
430
|
-
- set property `commons-lang3.version` to `3.17.0`
|
|
431
|
-
- set property `commons-io.version` to `2.19.0`
|
|
432
|
-
- set property `commons-text.version` to `1.13.1`
|
|
433
|
-
- set property `prestations-be.version` to `18.x.y`
|
|
434
|
-
- remove plugin `maven-assembly-plugin` and its properties (`<assembly.xxx`)
|
|
435
|
-
- remove dependency `spring-cloud-starter-netflix-eureka-client`
|
|
436
|
-
- remove dependency `javax.el` and its property (`<javax.el.version>`)
|
|
437
|
-
|
|
438
|
-
If you used `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin`, you should replace it with `org.jvnet.jaxb:jaxb-maven-plugin`
|
|
439
|
-
|
|
440
|
-
```
|
|
441
|
-
<plugin>
|
|
442
|
-
<groupId>org.jvnet.jaxb</groupId>
|
|
443
|
-
<artifactId>jaxb-maven-plugin</artifactId>
|
|
444
|
-
<version>${jaxb-maven-plugin.version}</version>
|
|
445
|
-
<configuration>
|
|
446
|
-
<strict>false</strict> <!-- see https://github.com/highsource/maven-jaxb2-plugin/wiki/Catalogs-in-Strict-Mode -->
|
|
447
|
-
<schemaDirectory>${basedir}/src/main/resources/xsd/</schemaDirectory>
|
|
448
|
-
<args>
|
|
449
|
-
<arg>-extension</arg>
|
|
450
|
-
<arg>-Xvalue-constructor</arg>
|
|
451
|
-
<arg>-XsimpleEquals</arg>
|
|
452
|
-
<arg>-XsimpleHashCode</arg>
|
|
453
|
-
<arg>-Xinheritance</arg>
|
|
454
|
-
</args>
|
|
455
|
-
</configuration>
|
|
456
|
-
<executions>
|
|
457
|
-
<execution>
|
|
458
|
-
<goals>
|
|
459
|
-
<goal>generate</goal>
|
|
460
|
-
</goals>
|
|
461
|
-
<configuration>
|
|
462
|
-
<schemaIncludes>
|
|
463
|
-
<include>backoffice.xsd</include>
|
|
464
|
-
</schemaIncludes>
|
|
465
|
-
</configuration>
|
|
466
|
-
</execution>
|
|
467
|
-
</executions>
|
|
468
|
-
<dependencies>
|
|
469
|
-
<dependency>
|
|
470
|
-
<groupId>org.jvnet.jaxb</groupId>
|
|
471
|
-
<artifactId>jaxb-plugins</artifactId>
|
|
472
|
-
<version>${jaxb-plugins.version}</version>
|
|
473
|
-
</dependency>
|
|
474
|
-
<dependency>
|
|
475
|
-
<groupId>org.jvnet.jaxb2_commons</groupId>
|
|
476
|
-
<artifactId>jaxb2-namespace-prefix</artifactId>
|
|
477
|
-
<version>${jaxb2-namespace-prefix.version}</version>
|
|
478
|
-
</dependency>
|
|
479
|
-
</dependencies>
|
|
480
|
-
</plugin>
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
with these properties :
|
|
484
|
-
|
|
485
|
-
```
|
|
486
|
-
<jaxb-maven-plugin.version>4.0.8</jaxb-maven-plugin.version>
|
|
487
|
-
<jaxb-plugins.version>3.0.0</jaxb-plugins.version>
|
|
488
|
-
<jaxb2-namespace-prefix.version>2.0</jaxb2-namespace-prefix.version>
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
### APPLICATION-PARENT
|
|
492
|
-
|
|
493
|
-
- remove property `java.version` (already set to `21` in the parent)
|
|
494
|
-
- if existing, remove exclusion `spring-cloud-starter-netflix-eureka-client` from `starter-prestation`
|
|
495
|
-
- remove dependency `spring-boot-starter-validation` (already in `starter-prestation`)
|
|
496
|
-
- remove devex properties
|
|
497
|
-
|
|
498
|
-
If you used `org.jvnet.jaxb2.maven2:maven-jaxb2-plugin`, you should replace it with `org.jvnet.jaxb:jaxb-maven-plugin`
|
|
499
|
-
|
|
500
|
-
```
|
|
501
|
-
<plugin>
|
|
502
|
-
<groupId>org.jvnet.jaxb</groupId>
|
|
503
|
-
<artifactId>jaxb-maven-plugin</artifactId>
|
|
504
|
-
<executions>
|
|
505
|
-
<execution>
|
|
506
|
-
<goals>
|
|
507
|
-
<goal>generate</goal>
|
|
508
|
-
</goals>
|
|
509
|
-
<configuration>
|
|
510
|
-
<schemaIncludes>
|
|
511
|
-
<include>backoffice.xsd</include>
|
|
512
|
-
</schemaIncludes>
|
|
513
|
-
</configuration>
|
|
514
|
-
</execution>
|
|
515
|
-
</executions>
|
|
516
|
-
</plugin>
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
### clean / build your project
|
|
520
|
-
|
|
521
|
-
- remove the annotation `@EnableEurekaClient`
|
|
522
|
-
- remove the property `eureka.client.enabled`
|
|
523
|
-
- remove the property `eureka.client.serviceUrl.defaultZone` (in you configuration repository)
|
|
524
|
-
- replace deprecated annotation `@MockBean` with `@MockitoBean`
|
|
525
|
-
- remove deprecated field constructor `Validator validator` from `AbstractSdkController`
|
|
526
|
-
- use `SdkControllerTest.getValidator()` instead of creating a `LocalValidatorFactoryBean` to build your ``
|
|
527
|
-
|
|
528
|
-
build your project with java 21 :
|
|
529
|
-
|
|
530
|
-
```
|
|
531
|
-
mvn -U clean install -Pnof,noft
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
### Property migration
|
|
535
|
-
|
|
536
|
-
run you application with this dependency :
|
|
537
|
-
|
|
538
|
-
```
|
|
539
|
-
<dependency>
|
|
540
|
-
<groupId>org.springframework.boot</groupId>
|
|
541
|
-
<artifactId>spring-boot-properties-migrator</artifactId>
|
|
542
|
-
<scope>runtime</scope>
|
|
543
|
-
</dependency>
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
look for logs that indicate property you should migrate, update them and remove the dependency
|
|
547
|
-
|
|
548
|
-
### Captcha configuration
|
|
549
|
-
|
|
550
|
-
- As stated in the migration guide from v16 to v17, Cybercache is responsible of the captcha turnstile verify call.
|
|
551
|
-
- Therefore, you can remove properties related to this configuration :
|
|
552
|
-
- `recaptcha.byPassUUID`
|
|
553
|
-
- `recaptcha.proxyUrl`
|
|
554
|
-
- `recaptcha.proxyPort`
|
|
555
|
-
- `recaptcha.secretkey`
|
|
556
|
-
- `recaptcha.publickey`
|
|
557
|
-
- If your application was not using Refinf through property `cyber-cache.configuration.enabled=false` and you still need the Recaptcha, you can replace this property with `cyber-cache.refinf-v5.enabled=false`, remove duplicated properties as before, add `cyber-cache.base-url` in your configuration and add your deployment unit in Mizo (Cybercache) for role `user`.
|
|
558
|
-
|
|
559
|
-
Cookie storage is kept as before, therefore you can keep cookie related properties that starts with `recaptcha.cookie.YYY` in your properties.
|
|
560
|
-
|
|
561
|
-
See [Skeleton](https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton/pull-requests/708/overview) for a working example
|
|
562
|
-
|
|
563
|
-
### HIBERNATE
|
|
564
|
-
|
|
565
|
-
## Sequences
|
|
566
|
-
|
|
567
|
-
Hibernate doesn't use the default sequence anymore, you can keep using it by replacing
|
|
568
|
-
|
|
569
|
-
```
|
|
570
|
-
@GeneratedValue(strategy = GenerationType.SEQUENCE)
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
with
|
|
574
|
-
|
|
575
|
-
```
|
|
576
|
-
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
|
|
577
|
-
@SequenceGenerator(name = "hibernate_sequence", allocationSize = 1)
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
## Dates mapping
|
|
581
|
-
|
|
582
|
-
replace `@Type(LocalDateTimeUserType.class)` by `@Convert(converter = LocalDateTimeConverter.class)`
|
|
583
|
-
replace `@Type(LocalDateUserType.class)` by `@Convert(converter = LocalDateConverter.class)`
|
|
584
|
-
|
|
585
|
-
## H2
|
|
586
|
-
|
|
587
|
-
If you had a fixe H2 version for testing, you should upgrade to the latest version by removing :
|
|
588
|
-
|
|
589
|
-
```
|
|
590
|
-
<h2.version>1.4.200</h2.version>
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
### Jenkins files for Unit tests
|
|
594
|
-
|
|
595
|
-
buildPipeline is not supported anymore, replace the content of jenkins>UT>JenkinsFile with :
|
|
596
|
-
|
|
597
|
-
```
|
|
598
|
-
@Library('devsup-library') _
|
|
599
|
-
|
|
600
|
-
buildAppPipelinePodmanUT([
|
|
601
|
-
name : 'the name of your application',
|
|
602
|
-
label : 'your slaves lable',
|
|
603
|
-
jdk : '21',
|
|
604
|
-
node : '20'
|
|
605
|
-
])
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
### Debugging tips
|
|
609
|
-
|
|
610
|
-
Spring boot 3 doesn't support calling a controller with a trailing slash, fix the url called (/api/ping != /api/ping**/**)
|