How to integrate specmatic with java 11 and spring boot 2.2.6 #1493
-
I am trying to integrate specmatic with java 11 project and spring boot 2.2.6. I am getting the below error. Which version of specmatic need to be included so that the following error can be mitigated. I am currently using version 2.0.49 of specmatic. Also including the full log and project for details. [INFO] BUILD FAILURE |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
hello @prateekkarmakar , thanks for reaching out. Specmatic 2.x onwards the minimum Java version required is 17. And that is why you are seeing this error, as you have rightly pointed out. Since your project is in Java 11, the recommended approach here will be run Contract Test externally. By which I mean, instead of adding Specmatic as a library dependency in your project, you can run Specmatic contract test independently from using the Specmatic JAR executable, NPM module or Docker image. This way Specmatic is only interacting with your application over HTTP protocol and so Java versions will not matter. You can follow Java JAR, NPM, Docker, etc. related documentation in our getting started page for the same. Hope this helps. |
Beta Was this translation helpful? Give feedback.
hello @prateekkarmakar , thanks for reaching out.
Specmatic 2.x onwards the minimum Java version required is 17. And that is why you are seeing this error, as you have rightly pointed out.
Since your project is in Java 11, the recommended approach here will be run Contract Test externally. By which I mean, instead of adding Specmatic as a library dependency in your project, you can run Specmatic contract test independently from using the Specmatic JAR executable, NPM module or Docker image. This way Specmatic is only interacting with your application over HTTP protocol and so Java versions will not matter.
You can follow Java JAR, NPM, Docker, etc. related documentation in our getting sta…