我正在尝试在 Weblogic 12c (12.1.3) 上部署一个简单的 Spring Boot 应用程序,它在开发人员环境中运行良好.然而,当需要在战争中重新包装它并将其连接到耳朵时,这似乎无法正确部署.
I'm trying to deploy a simple Spring Boot application on Weblogic 12c (12.1.3), in a developer environment it does work perfectly. However when need to repackage it in a war and to attach it to an earand this does not seem to deploy correctly.
这是堆栈跟踪:
<Nov 23, 2016 6:15:13 PM CET> <Error> <Munger> <BEA-2156200> <Unable to load descriptor weblogic.utils.classloaders.GenericClassLoader@6964c078 finder: weblogic.utils.classloaders.CodeGenClassFinder@5715556 annotation: my-app-ear@/WEB-INF/lib/tomcat-embed-websocket-8.5.6.jar!/META-INF/web-fragment.xml of module /my-app. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed非常欢迎任何输入.提前致谢.
Any input will be very welcome. Thanks in advance.
推荐答案来自 Spring Boot 文档、
From Spring Boot docs,
要将 Spring Boot 应用程序部署到 WebLogic,您必须确保您的 servlet 初始化程序直接实现了 WebApplicationInitializer(即使您从已经实现它的基类进行扩展).
To deploy a Spring Boot application to WebLogic you must ensure that your servlet initializer directly implements WebApplicationInitializer (even if you extend from a base class that already implements it).
例如
改变这个,
public class Application extends SpringBootServletInitializer {到
public class Application extends SpringBootServletInitializer implements WebApplicationInitializer {注意: SpringBootServletInitializer 已经实现了 WebApplicationInitializer,但是您需要再做一次.
NOTE: SpringBootServletInitializer already implements WebApplicationInitializer, but you need to do it again.
截至目前,我不知道为什么.
As of now,I don't know Why.
public abstract class SpringBootServletInitializer implements WebApplicationInitializer {来自 Spring 源代码,
From Spring source code,
更多推荐
如何在 Weblogic 12c (12.1.3) 上部署 Spring Boot 应用程序?
发布评论