Last active
April 9, 2019 02:57
-
-
Save jamestrandung/826b55e4b364bfe35265ade576543f77 to your computer and use it in GitHub Desktop.
Update javax.xml.bind.JAXBContextFactory to make use of packaged JAXB library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
// Updating javax.xml.bind.JAXBContextFactory to make use of com.sun.xml.bind.v2.ContextFactory from our packaged WAR | |
System.setProperty("javax.xml.bind.JAXBContextFactory", "com.sun.xml.bind.v2.ContextFactory"); | |
return application.sources(Application.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment