crnk-project / crnk-framework

JSON API library for Java
Apache License 2.0
286 stars 153 forks source link

Support SpringBoot 3 with `jakarta` api #869

Open UkonnRa opened 1 year ago

UkonnRa commented 1 year ago

Currently crnk-setup-servlet are heavily based on javax.servlet api so it's not compatible with jakarta api at all. All the servlet filters are failed in Spring Boot 3.

So any plan so migrate to the new jakarta API? I tried a little bit, but it seems to reweite all the crnk-setup-servlet and crnk-setup-spring-boot2 modules, which is too redundant for users.

So hope the maintainer can add the support on the code side.

MrTomato commented 1 year ago

second that request!

InNeedOfStreetCred commented 1 year ago

Without support for Spring Boot3 this will be very quickly abandonware.

remmeier commented 1 year ago

PRs are welcomed

InNeedOfStreetCred @.***> schrieb am Do., 22. Dez. 2022, 12:13:

Without support for Spring Boot3 this will be very quickly abandonware.

— Reply to this email directly, view it on GitHub https://github.com/crnk-project/crnk-framework/issues/869#issuecomment-1362714154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5DJFJ3IAJKFD4FNILEWFTWOQZV5ANCNFSM6AAAAAAS27G6HY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kdejaeger commented 1 year ago

I would like to stick with this library as well. I don't find the other alternatives mentioned on https://jsonapi.org/implementations/#client-libraries-java better. It's sad to see this one perish. But I understand if you don't have time @remmeier . Life is changing all the time right.

ruzkant commented 1 year ago

I am new to CRNK and haven't delved into spring boot 3 yet, but planning to in the coming months. How much guidance would you be able to provide for something like this.

The servlet aspect looks straightforward. I imagine one only needs to duplicate the crnk-setup-servlet module and change the package names and fix small issues.

I am not sure how much of the crnk-setup-spring-boot2 module would be reusable but that code base is more sizable.

The bigger issue is probably the java 17 baseline. It seems to me crnk would have to create a new major version and maintain both streams the way spring did. This could escalate the development to other modules of CRNK, depending on how much breaks compiling in 17. [Edit] I guess a start would be to just compile the spring-boot3 module in 17. Rough thoughts.

@remmeier Do you have any thoughts on this and how a PR could work? How much guidance are you able to provide?

remmeier commented 1 year ago

a new major version seems good to me. upgrade everything to the latest versions and new packages. in the past we have been more careful at maintaining backwards compatibility. but with javaee/jakarta/... many things change. everything else would be too much effort. a simple upgrade would be quick to do

przeemek commented 1 year ago

Happy to help as well with the migration.

dennisvonk commented 1 year ago

For our project we want to have the SpringBoot v3 dependency, so I created a fork and want to have a go at it. If anyone has pointers, specific things to take into account, please let me know. And some reviewers later on when it is ready to merge back would also be appreciated.

whgibbo commented 1 year ago

Is there a branch for the Java17 / Spring Framework 6.x / Spring Boot 3.x work . As would like to contribute if I can

dennisvonk commented 1 year ago

Nice that you want to help. As priorities at my assignment have changed, I haven't done anything to this fork. I have send you an invitation.

whgibbo commented 1 year ago

Nice that you want to help. As priorities at my assignment have changed, I haven't done anything to this fork. I have send you an invitation.

So which branch should I look at ?

dennisvonk commented 1 year ago

sorry for the late reply, I had a short holiday. There is no work done yet, only a fork of the original master branche is made. So any work you do can be done in your own branch.

Yosuva commented 12 months ago

Currently I am trying to migrate spring boot 3. My crnk API application is returning 404 message after upgrading spring boot 3. Do anyone have idea about this issue? or will Crnk support spring boot 3 ?

whgibbo commented 11 months ago

@remmeier / @dennisvonk so any plans / list of tasks as would like to help if I can. I can think of the following:

  1. Java 8 -> Java 17 (due to spring boot / framework min supported) Change Gradle version from 6 - > 7.3/8.3
  2. Change Gradle version from 6 - > 8.2.1 ? Java 8 -> Java 17 (due to spring boot / framework min supported)
  3. Update spring packages to version 3.x
  4. update the servlet code from javax -> jakarta
  5. review 3rd party libraries and update as required.

reference links

dennisvonk commented 10 months ago

Hi whgibbo,

that looks like a good plan. Step 2 might not be needed, but other steps I totally agree with. As you can see, not a lot has changed, which has to do with the amount of work on my day-job. Hopefully you and others can pickup these tasks.

Dennis Vonk

Op za 12 aug 2023 om 22:25 schreef whgibbo @.***>:

@remmeier https://github.com/remmeier / @dennisvonk https://github.com/dennisvonk so any plans / list of tasks as would like to help if I can. I can think of the following:

  1. Java 8 -> Java 17 (due to spring boot / framework min supported)
  2. Change Gradle version from 6 - > 8.2.1 ?
  3. Update spring packages to version 3.x
  4. update the servlet code from javax -> jakarta
  5. review 3rd party libraries and update as required.

reference links

- https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide

— Reply to this email directly, view it on GitHub https://github.com/crnk-project/crnk-framework/issues/869#issuecomment-1676087370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZXH5VWITEQHFCKAYNDDHLXU7RE3ANCNFSM6AAAAAAS27G6HY . You are receiving this because you were mentioned.Message ID: @.***>

joshuapsteele commented 9 months ago

Any updates on adding Spring Boot 3 support for crnk? I'm in the middle of updating some old stuff that uses katharsis. Ran up against jakarta/Spring Boot 3 incompatibility issues. I had hoped that switching to crnk would solve things, but still seeing javax/jakarta related errors that led me to this issue/thread.

joshuapsteele commented 9 months ago

FYI, we're working on a branch/PR to support jakarta and Spring Boot 3 here: https://github.com/crnk-project/crnk-framework/pull/882

whgibbo commented 9 months ago

@jsteelepfpt just need somebody to review it now.. I'll take a look if you like.. anybody else?

kjthorpe18 commented 9 months ago

@whgibbo (cc @jsteelepfpt) it's still very much in progress. Fair warning, this my first time using Gradle, and first time looking at the crnk codebase. So I apologize for how messy it is, but I'm hoping to drive a path forward and those with more experience can hop in and help out.

Specifically, I might have overdone the compile -> api/implementation changes. Some dependencies may be duplicates or not needed. Also, the crnk-integration-examples, except for Spring Boot, are for integrations I'm not familiar with. Those could use more eyes. Spring Boot 3 also had changes around WebMvcMetrics* that are currently causing compilation errors in the Spring Boot Example. I haven't figured out the best way to replace that yet.

kjthorpe18 commented 8 months ago

I've hit a bit of a roadblock with the upgrade work. I'm also with splitting my time with other responsibilities, so if anyone can take a look and try to move it forward, any help is appreciated! https://github.com/crnk-project/crnk-framework/pull/882#issuecomment-1769729169

tory-kk commented 2 months ago

Hello, Is there any progress with Spring Boot 3 support?