如何在 Weblogic 12c (12.1.3) 上部署 Spring Boot 应用程序? [英] How to deploy a Spring Boot application on Weblogic 12c (12.1.3)?

查看:51
本文介绍了如何在 Weblogic 12c (12.1.3) 上部署 Spring Boot 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 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 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆