在 Websphere 8.5.5 中部署 Spring 引导应用程序时出错
Error deploying Spring boot application in Websphere 8.5.5
我在 Websphere 8.5.5 中启动我的应用程序时在标准输出中收到以下错误消息:
1/9/20 11:56:48:437 UTC] 000000c0 SystemOut O 11:56:48.435 [WebContainer : 3] ERROR
org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:545)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:464)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null(ConfigFileApplicationListener.java:443)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader$$Lambda0.0000000000368730.accept(Unknown Source)
at java.lang.Iterable.forEach(Iterable.java:86)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load(ConfigFileApplicationListener.java:443)
我使用的spring引导版本是2.2.2。
为什么 Spring Boot 试图加载位于 META-INF 文件夹中的 ear 部署描述符?
正如M. Deinum所说,它给出的问题是因为Spring Boot is trying to load the ear artifact's application.xml file to获取属性并给出解析错误,因为它没有预期的格式。
我在应用程序服务器中显示时遇到了同样的错误,通过从 MANIFEST.MF 文件中获取路径 /META-INF[=12= 解决了这个问题]
在我的例子中,我包含了 war 插件:
<manifestEntries>
<Class-Path>./ META-INF/</Class-Path>
</manifestEntries>
尝试删除该条目并重新部署。
我在 Websphere 8.5.5 中启动我的应用程序时在标准输出中收到以下错误消息:
1/9/20 11:56:48:437 UTC] 000000c0 SystemOut O 11:56:48.435 [WebContainer : 3] ERROR
org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:545)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:464)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null(ConfigFileApplicationListener.java:443)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader$$Lambda0.0000000000368730.accept(Unknown Source)
at java.lang.Iterable.forEach(Iterable.java:86)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load(ConfigFileApplicationListener.java:443)
我使用的spring引导版本是2.2.2。
为什么 Spring Boot 试图加载位于 META-INF 文件夹中的 ear 部署描述符?
正如M. Deinum所说,它给出的问题是因为Spring Boot is trying to load the ear artifact's application.xml file to获取属性并给出解析错误,因为它没有预期的格式。
我在应用程序服务器中显示时遇到了同样的错误,通过从 MANIFEST.MF 文件中获取路径 /META-INF[=12= 解决了这个问题]
在我的例子中,我包含了 war 插件:
<manifestEntries>
<Class-Path>./ META-INF/</Class-Path>
</manifestEntries>
尝试删除该条目并重新部署。