Nikita upgrade to spring boot 3.0 / Java17

Thomas Sødring tsodring at oslomet.no
Mon Oct 17 10:16:51 CEST 2022


Hi,

Spring boot 3.0 is coming soon (in November) and I have been looking at how difficult it is to upgrade (from 2.6.x). I created an own branch for this:

  https://gitlab.com/OsloMet-ABI/nikita-noark5-core/-/tree/spring_boot_3

So far, a lot of the issues have been changing the "javax" namespace to "jakarta". Some changes in Spring e.g., the PagingAndSortingRepository has changes its inheritance line

https://spring.io/blog/2022/02/22/announcing-listcrudrepository-friends-for-spring-data-3-0

and this affects the codebase.  We don't actually use PagingAndSortingRepository in practice, so rather than updating to the latest approach, I will downgrade all repository interfaces to CrudRepository. The reason we don't use PagingAndSortingRepository is that all searches except findOne() type search are delegated to the OData handler in Nikita.

Another change (in hibernate 6.0, not spring) is that UUID are annotated differently in Java code now. A little more about this here:

https://in.relation.to/2022/05/12/orm-uuid-mapping/

Probably the biggest difference to Nikita with this branch is that spring boot 3.0 requires Java 17 as baseline. This brings a lot of syntactic goodies for coding, but also allows us to stay up to speed with the general improvements that are occurring with Java and related tools.

It is my intention to make Nikita follow the Spring upgrade path, rather than stay on older versions until support expires. 2.7 has another year of support, but we will be forced to upgrade at some point!

 - Tom





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nuug.no/pipermail/nikita-noark/attachments/20221017/714887d8/attachment.htm>


More information about the nikita-noark mailing list