I am deploying a Spring Boot project, using devtools (spring-boot-devtools) with a SOAP service.
I generate the Soap class into the /src/main/resources/templates/generated folder, and add this folder as Source Code.
When I call this SOAP service, there is a problem:
java.lang.IllegalArgumentException: ...ClassV11PortType referenced from a method is not visible from class loader
So, I added the spring-devtools.properties file to /src/main/resources/META-INF/spring-devtools.properties,
and added this line to the spring-devtools.properties file:
restart.exclude.mygeneratedclasses=/*[packageOfGeneratedClass]*.class
Then I can call the SOAP service successful. But now, my project cannot reload automatically when I modify some code. I was trying to edit some code anywhere and save it, but no luck; my project does not reload.
Instead of excluding generated files, you can try to include JAR responsible for loading these classes into restart classloader (used in spring-devtools).
For dependency com.sun.xml.ws:jaxws-rt:2.3.2-1, update /src/main/resources/META-INF/spring-devtools.properties like this:
restart.include.jax=/jaxws-rt.*\.jar
Github issue reference: Devtools cannot be use with jaxws-ri #19379
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With