gpt4 book ai didi

java - 如何在weblogic上部署spring boot应用程序?

转载 作者:行者123 更新时间:2023-12-02 02:00:30 25 4
gpt4 key购买 nike

我想在weblogic上部署一个spring boot应用程序。我有这个错误:

错误 javax.servlet.ServletException:未在 Jetty 上运行,JSR-356 支持不可用Erreur 未在 Jetty 上运行,JSR-356 支持不可用

Spring boot 版本 1.5.20/weblogic 版本 12c

你能帮我吗???

主要代码

@SpringBootApplication
public class BlsApplication extends SpringBootServletInitializer implements WebApplicationInitializer {

private static final Logger LOGGER = LoggerFactory.getLogger(BlsApplication.class);

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(BlsApplication.class);
}

public static void main(String[] args) {
SpringApplication.run(BlsApplication.class, args);
LOGGER.info("BLS Application has been launched");
}

}

pom.xml文件的代码

<dependencies>
<dependency>
<groupId>com.bct.bls</groupId>
<artifactId>bls-service</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>all-themes</artifactId>
</dependency>
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-faces</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

最佳答案

您需要从 pom.xml 中排除以下包

 <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

或将范围设置为“已提供”。

关于java - 如何在weblogic上部署spring boot应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57376785/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com