- Code compiled successfully
- errors
- Deprecation warnings
- src/main/java/example/cashcard/SecurityConfig.java uses or overrides a deprecated API.
- found disabled/broken test - CashCardApplicationTests#shouldReturnACashCardWhenDataIsSaved
- fixed broken test and re-enabled
Result: code compiles without errors or warnings and all tests pass
- Upgrade Spring Security to
5.8.5
- Spring Security deprecations
- [INFO] /course-spring-boot-2-7-to-3-1-upgrade-code/src/main/java/example/cashcard/SecurityConfig.java: /course-spring-boot-2-7-to-3-1-upgrade-code/src/main/java/example/cashcard/SecurityConfig.java uses or overrides a deprecated API.
- [INFO] /course-spring-boot-2-7-to-3-1-upgrade-code/src/main/java/example/cashcard/SecurityConfig.java
- Reference: https://docs.spring.io/spring-security/reference/5.8/migration/index.html
- Replace
WebSecurityConfigurerAdapter
super class withSecurityFilterChain
bean definition - Replace
antMatcher
withrequestMatcher
builder method - Replace
new Pbkdf2PasswordEncoder
with static factory method for Spring Security 5.8 - Add
@Configuration
annotation, which is removed in Spring Security 6.0
Result: code compiles without errors or warnings and all tests pass (no skipped tests)!
- Code Compiles, No Errors or Warnings
- remove hardcoded
spring-data-jdbc
version - Code Compiles, No Errors or Warnings
- remove hardcoded
lombok
version - Code Compiles, No Errors or Warnings
- moved hardcoded
itextpdf
version to
- Remove Spring Security version override and upgrade Spring Security to
6.1.3
- Spring Security deprecations
[WARNING] ... src/main/java/example/cashcard/SecurityConfig.java:[24,13] authorizeHttpRequests() in org.springframework.security.config.annotation.web.builders.HttpSecurity has been deprecated and marked for removal [WARNING] ... src/main/java/example/cashcard/SecurityConfig.java:[27,17] and() in org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry has been deprecated and marked for removal [WARNING] ... src/main/java/example/cashcard/SecurityConfig.java:[28,17] csrf() in org.springframework.security.config.annotation.web.builders.HttpSecurity has been deprecated and marked for removal
- Update
http.authorizeHttpRequests
to use the new customizer interface - Update
csrf
to use the new customizer interface
Result: code compiles without errors or warnings
Result: code compiles without errors or warnings and all tests pass
Remove explicit version ofaspectj-core
- Remove explicit
aspectj-core
dependency- It's managed by
spring-boot-starter-test
- It's managed by
Result: code compiles without errors or warnings and all tests pass
- Property
spring.kafka.streams.cache-max-size-buffering
is deprecated- replaced by
spring.kafka.streams.state-store-cache-max-size
- replaced by