以下是applicationContext.xml
https://docs.google.com/document/d/129KY78DLm2yFHWTzPpyQ7OT8dcdzUKhmYB5pcUQHwFY/edit?usp=sharing
以下是web.xml
https://docs.google.com/document/d/12jUEhPq1hSN1JdPt_3MrFtwo-bxaqVXkjIr7iPzolmU/edit?usp=sharing
以下是POJO类
https://docs.google.com/document/d/11PPw1Wx5uvyhhDXmzEftJMJW6jpHfl7CIJgdy4TQtnI/edit?usp=sharing
还有一些文件,但我认为这些文件足以解决错误。我将文件更新为gdrive,因为我在输入代码时遇到错误。
我的应用程序中的错误是:
13-May-2014 15:07:44.164 INFO [http-nio-8084-exec-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
13-May-2014 15:07:44.275 INFO [http-nio-8084-exec-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
13-May-2014 15:07:45.632 SEVERE [http-nio-8084-exec-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
答案 0 :(得分:0)
你需要依赖
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
版本
<spring.framework.version>3.2.5.RELEASE</spring.framework.version>
<aspectj.version>1.7.2</aspectj.version>