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

Dependency Updates #55

Merged
merged 16 commits into from
Oct 23, 2023
Merged

Conversation

mikejritter
Copy link
Contributor

Changes

Dependency Updates

  • Spring Framework -> 5.3.25
  • Spring Data -> 2.7.7
  • Spring Security -> 5.8.3
  • Tiles -> 3.0.1
  • Hibernate Validator -> 5.4.3

Spring Data

Most of the spring data updates are pretty straightforward, moving from findOne to findById or the equivalent. Since the byId methods now return Optionals I adjusted the logic with what felt appropriate. There are a few places where I chose to stick with the old behavior by returning null if the id doesn't exist otherwise operations could be wrapped with ifPresent.

Spring Security

The spring security changes here are pretty minimal. I had to remove the static initialization which set the holder strategy in order to get the method security to work. Other changes were just to the password encoder and using getContextHolderStrategy which looked to be the way of getting the SecurityContext internally.

There are further security updates which can be made that I think should be handled later, such as migrating from global method security to method security. These would be done in order to make migrating to Spring 6 easier.

Config

The tiles view config moved from xml to java as the packages for the beans changed. This just made it a little easier to see which migrations needed to happen as I wasn't getting any ide hints in the xml.

The xml updates consist mostly of dropping the version from the bean uris. The only exception was the security xmlns which intellij was still yelling at me about.

Web XML

Added init-param to the web.xml were made in order to allow for removal of the ama-servlet.xml file.

QOL

Updated logging where object arrays were used or parameters were missing
Removed some unused code
Minor API changes (e.g. Long.valueOf)

Other Notes

I'm not sure if this will run with the current version of the duracloud dependency. It looks like I had been testing off of develop in that project (maybe from when I was deploying a test duracloud), but with some additional dependency updates on commons-lang3 and spring-context-support. I also bumped both dependencies to 7.2.0-SNAPSHOT in order to make sure I was pulling in the latest changes.

@dbernstein

* Spring Framework to 5
* Spring Data to 2.7
* Spring Security to 5
* Apache Tiles to 3
* Hibernate Validator to 5.4
* Various managed dependencies for resolving conflicts
* Remove static init so the default strategy is used
* When getting SecurityContext, use the strategy holder
* Remove dead code
* Fix missing arguments in logging statements
* Unwrap object arrays in logging statements
* Other minor api changes
* Replaces xml config with java for easier migrations
* Updates to Tiles API
* Remove version where possible
* Update security password encoder bean
* xmlns cleanup
* add init param in order to remove servlet xml
@mikejritter
Copy link
Contributor Author

@dbernstein there was a recent CVE published for spring so I'm going to update to 5.3.27+ shortly. Going to double check duracloud-db as well first.

Copy link
Member

@dbernstein dbernstein left a comment

Choose a reason for hiding this comment

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

Looks good.

@dbernstein dbernstein merged commit 70ccedc into duracloud:develop Oct 23, 2023
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.

2 participants