我正在开发一个使用spring boot 1.4.x的web服务,并将它部署在支持java 6的Websphere 8.5中。但是当我部署我的战争时,错误。什么是Spring Boot 1.4.x所需的最低java版本
看起来像Spring引导中的JAR依赖(spring-ws-core-2.3.1.RELEASE.jar)有一些类是用java 7编译的。这导致了错误。
什么是使用Spring Boot 1.4.x所需的最低java版本? 在我的情况下,是否可以将上面的依赖关系单独覆盖到较低版本?
错误:
2/16/17 10:58:08:296 EST] 000000f2 CompositionUn E WSVR0194E: Composition unit WebSphere:cuname=testpp-1_0_0-SNAPSHOT_war in BLA WebSphere:blaname=testpp-1_0_0-SNAPSHOT_war failed to start.
[2/16/17 10:58:08:299 EST] 000000f2 MBeanHelper E Could not invoke an operation on object: WebSphere:name=ApplicationManager,process=server1,platform=proxy,node=MyNode,version=8.5.5.2,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=MyCell,spec=1.0 because of an mbean exception: com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: JVMCFRE003 bad major version&#59; class=org/springframework/ws/transport/http/support/AbstractMessageDispatcherServletInitializer, offset=6
[2/16/17 10:58:08:299 EST] 000000f2 SystemErr R com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: JVMCFRE003 bad major version&#59; class=org/springframework/ws/transport/http/support/AbstractMessageDispatcherServletInitializer, offset=6
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432)
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
[2/16/17 10:58:08:300 EST] 000000f2 SystemErr R at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
POM配置
testap 示范工程春季启动
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.6</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
感谢您的确认。因此,如果我们使用Spring Boot 1.4,那么总是建议使用java 7。 – springbootlearner