ビルドされたTomcatサーバーを介してローカルで実行されるSpringブートアプリケーションがありますが、Weblogic 12.2のwarファイルとして展開する際に問題があります。私は、Springブートリファレンスガイドの "85.1 Deployable war fileの作成"のセクションに従ってwarファイルを構築し、それをホストする新しいWeblogic管理対象サーバを作成し、Weblogic上でデプロイメントのインストール手順をたどりましたが、デプロイメントで「すべての要求にサービスを提供」を開始します。助言がありますか? build.gradleのWeblogicにSpringブートをデプロイするときにNoSuchMethodError
依存セクション:
Caused By: java.lang.NoSuchMethodError: org.springframework.web.context.support.StandardServletEnvironment.initPropertySources(Ljavax/servlet/ServletContext;Ljavax/servlet/ServletConfig;)V
at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108)
at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:162)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1420)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1359)
Loads more weblogic errors here.
私のアプリケーションのエントリポイントがあるように思われる:スタート "すべての要求をサービスする" をクリックすると、WebLogicから受信
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
compile(
'org.springframework.boot:spring-boot-starter-web:1.5.8.RELEASE',
'org.springframework.boot:spring-boot-devtools',
'org.springframework.boot:spring-boot-starter-jdbc',
'org.springframework.boot:spring-boot-starter-data-jpa',
'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.2',
'org.springframework.boot:spring-boot-starter-security',
'javax.servlet:javax.servlet-api:3.1.0'
)
testCompile(
'org.springframework.security:spring-security-test',
'org.springframework.boot:spring-boot-starter-test'
)
providedRuntime (
'org.springframework.boot:spring-boot-starter-tomcat'
)
}
例外大丈夫:
@SpringBootApplication
public class Application extends SpringBootServletInitializer implements WebApplicationInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
春ブーツを削除依存
を追加します。なぜweblogicにspring-boot appを導入したいのですか? –
これを削除する方法はありますか?私が誤解していない限り、上記の "provideRuntime"依存関係を追加すると、ドキュメントから除外されます。私たちは、単にアプリケーションサーバーとしてWeblogicを使用します。 –