Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 2.17 KB

upgrade-notes.md

File metadata and controls

61 lines (39 loc) · 2.17 KB

Upgrade Notes

Initial baseline

  • Code compiled with no errors or warnings
  • found disabled/broken test - CashCardApplicationTests#shouldReturnACashCardWhenDataIsSaved
    • fixed broken test

Result: code compiles without errors or warnings and all tests pass

Upgrade Spring Boot Parent Version

Remove hard-coded Spring/Spring Boot Dependencies

  • remove hardcoded spring-data-jdbc version

Update Non Spring/Spring Boot Managed Dependencies

  • remove hardcoded lombok version
  • moved hardcoded itextpdf version to

Compile the code

  • Fix deprecated Application Event listener

Result: code compiles without errors or warnings

Upgrade Spring Security Version

  • Upgrade Spring Security to 5.8.5
  • Spring Security deprecations
    • [INFO] /course-spring-boot-2-5-upgrade-code/src/main/java/example/cashcard/SecurityConfig.java: /course-spring-boot-2-5-upgrade-code/src/main/java/example/cashcard/SecurityConfig.java uses or overrides a deprecated API.
    • [INFO] /course-spring-boot-2-5-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 with SecurityFilterChain bean definition
  • Replace antMatcher with requestMatcher 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

Test - Initial Test Execution

Result: code compiles without errors or warnings and all tests pass

Test Dependency Housekeeping

  • Remove explicit version of aspectj-core
  • Remove explicit aspectj-core dependency
    • It's managed by spring-boot-starter-test

Result: code compiles without errors or warnings and all tests pass

Address deprecated Spring Properties

  • Property spring.mvc.locale is deprecated
    • replaced by spring.web.locale