aabarmin / epam-microservices-training-2022

Apache License 2.0
14 stars 15 forks source link

Update to Java 21 in Dockerfile (microservices) #14

Closed naXa777 closed 1 year ago

naXa777 commented 1 year ago

I see that the project was migrated to Java 21 recently (#5). However there's still one place where old Java is used. See buildscripts/Dockerfile

FROM amazoncorretto:11
naXa777 commented 1 year ago

Without this change the microservices can't be run via docker-compose. I get error:

2023-10-14T15:44:58.759319300Z Error: LinkageError occurred while loading main class org.springframework.boot.loader.JarLauncher 2023-10-14T15:44:58.759351900Z java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Let me prepare a PR with a fix for #14. I fixed it locally anyway when testing my changes for #4.