Skip to content

Conversation

@danthe1st
Copy link
Member

@danthe1st danthe1st commented Nov 25, 2023

This PR updates to Spring Boot 3 (Open Source Support for Spring Boot 2.7 ended though the bot may not have kept updating minor versions anyways).

This is a major Spring and Spring Boot update. There are many breaking changes within Spring.

Aside from updating Spring, this PR contains the following changes:

  • The CI script was changed to use temurin (Adoptium) instead of adopt (which was AdoptOpenJDK which was replaced by Adoptium)
  • logback-classic was removed as a direct dependency in order for Spring to manage its version
  • Apache Commons Logging was removed since it conflicts with Spring's logging (logback)
  • There were two identical BotConfig beans specified in SpringConfig. One of them has been removed.
  • @Transactional was removed in /qotw-admin subcommands that either only perform read operations or only perform a single write operation.
    • @Transactional in commands causes issues as Spring creates CGLIB proxy classes which skip the constructor call and are not able to override DIH4JDA's ApplicationCommand#getCommandData/ApplicationCommand#setCommandData since these are final. As the constructor invocation is skipped for the proxy, this would cause a NPE. Removing @Transaction results in no proxy being created.

@danthe1st danthe1st requested a review from a team as a code owner November 25, 2023 22:03
@jasonlessenich jasonlessenich merged commit e20f529 into Java-Discord:main Dec 27, 2023
@danthe1st danthe1st deleted the spring-upgrade branch December 27, 2023 20:06
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