我创建了一个动态Web项目,但我无法将其部署到Apache Tomcat Server 6.0中.我尝试部署项目时遇到此错误:
没有可以从服务器添加或删除的资源.
为什么POJO Java类必须实现Serializable接口?如果我不执行Serializable会怎么样?
@Entity
@Table(name="Customer")
public class Customer implements Serializable {
private static final long serialVersionUID = -5294188737237640015L;
/**
* Holds Customer id of the customer
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "cust_id")
private int Custid;
/** Holds first Name of the customer*/
@Column(name = "first_name")
private String firstName;
/** Holds last Name of the customer */
@Column(name = "last_name")
private String lastName;
/** Holds Customer mobile number of customer*/
@Column(name = "cust_mobile")
private long MobileNo; …Run Code Online (Sandbox Code Playgroud) 无法启动应用程序,使此消息出现以下异常。
尝试升级Java和Spring Boot父启动器时
java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.stream.config.BindingServiceConfiguration.bindingService
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:181)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader
Caused by: java.lang.NoClassDefFoundError: org/springframework/integration/config/HandlerMethodArgumentResolversHolder
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:668)
... 39 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.config.HandlerMethodArgumentResolversHolder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 43 common frames omitted
Run Code Online (Sandbox Code Playgroud)
pom.xml已升级了Spring Boot父启动器和Java
我是否需要为此添加任何其他Maven依赖项?
尝试添加spring-integration-core依赖性会导致不同的异常。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.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.9</java.version>
<springfox.version>2.6.0</springfox.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId> …Run Code Online (Sandbox Code Playgroud) spring spring-integration spring-data spring-boot spring-cloud
eclipse ×1
java ×1
spring ×1
spring-boot ×1
spring-cloud ×1
spring-data ×1
tomcat ×1
tomcat6 ×1