Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update spring-boot to 3.x #664

Merged
merged 26 commits into from
Sep 5, 2023

Conversation

LukasLohoff
Copy link
Member

@LukasLohoff LukasLohoff commented Mar 22, 2023

🚨 BREAKING CHANGE 🚨

Description

Updates spring boot to 3.1.x / spring to 6.1 and also updates related dependencies:

@terrestris/devs Please review

Migration Guide

  • update java EE 8 dependencies to jakarta EE 9 (see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#jakarta-ee)
  • update your application.properties or application.yml according to the changes made in this Pull Request
  • update repositories
  • update your SecurityConfigs which extends KeycloakWebSecurityConfig or SimpleWebSecurityConfig
    • update your filter chain according to the the spring security migration guides below
    • replace antMatchers with requestMatchers, ignoringAntMatchers with ignoringRequestMatchers
    • if required, explicitly add .anyRequest().authenticated() to the end of your filter chain, as this is no longer the default
    • update your rules for swagger (/v3/api-docs) if they're not already updated
  • update your git-commit-id-plugin configuration and check if the version set in shogun is overridden (for more information see Fix build time for docker images #730)

Useful resources

Todos:

  • migration guide
  • fix circular spring references
  • check why / if we need hibernate dependencies
  • jakarta-mail.version is not found
  • check if replacement for SpringPhysicalNamingStrategy is needed
  • fix tests

Related issues or pull requests

Pull request type

  • Bugfix
  • Feature
  • Dependency updates
  • Tests
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)

Do you introduce a breaking change?

  • Yes
  • No

Checklist

  • I understand and agree that the changes in this PR will be licensed under the
    Apache Licence Version 2.0.
  • I have followed the guidelines for contributing.
  • The proposed change fits to the content of the code of conduct.
  • I have added or updated tests and documentation, and the test suite passes (run mvn test locally).
  • I have added a screenshot/screencast to illustrate the visual output of my update.

Copy link
Member

@dnlkoch dnlkoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome @LukasLohoff!

pom.xml Outdated Show resolved Hide resolved
shogun-gs-interceptor/pom.xml Outdated Show resolved Hide resolved
Copy link
Member

@ahennr ahennr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @LukasLohoff

pom.xml Outdated Show resolved Hide resolved
BREAKING CHANGE: requires migration for spring / spring-security 6 and hibernate 6 updates

Migration guide:

- update java EE 8 dependencies to jakarta EE 9 (see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#jakarta-ee)
- update repositories
  - update `@QueryHints` annotations
  - e.g. `org.hibernate.annotations.QueryHints.CACHEABLE` -> `AvailableHints.HINT_CACHEABLE`
  - if you use custom data fetching methods, migration steps for hibernate 6 / 6.1 / 6.2 might be necessary
    - especially consider https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#removals
    - for more information see the hibernate migration guides listed below
- update your SecurityConfigs which extend `KeycloakWebSecurityConfig` or `SimpleWebSecurityConfig`
   - update your filter chain according to the the spring security migration guides below
   - replace `antMatchers` with `requestMatchers`, ignoringAntMatchers with ignoringRequestMatchers
   - update your rules for swagger (`/v3/api-docs`) if they're not already updated
- update your `git-commit-id-plugin` configuration and check if the version set in shogun is overridden (for more information see  terrestris#730)
@LukasLohoff LukasLohoff merged commit b1b44aa into terrestris:main Sep 5, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants