如何在 Weblogic 12c (12.1.3) 上部署 Spring Boot 应用程序?

编程入门 行业动态 更新时间:2024-10-11 09:24:57
本文介绍了如何在 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 应用程序?

本文发布于:2023-10-28 10:54:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536431.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   如何在   Weblogic   Spring   Boot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!