springmvc 利用aop对controller 进行日志异常记录 和登陆验证

<aop:aspectj-autoproxy proxy-target-class="true"/>

写到spring-mvc.xml配置文件中。 网上有很多类似文章


服务器启动时,一直初始化bean 报错 主要是缺少jar包

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Expected raw type form of org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$Match

		<!-- https://mvnrepository.com/artifact/aopalliance/aopalliance JDK aop -->
		<dependency>
		    <groupId>aopalliance</groupId>
		    <artifactId>aopalliance</artifactId>
		    <version>1.0</version>
		</dependency>
		
		<dependency>  
		<groupId>org.aspectj</groupId>  
		<artifactId>aspectjtools</artifactId>  
		<version>1.7.4</version>  
		</dependency>  
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
			<version>${spring.version}</version>
		</dependency>


展开阅读全文

没有更多推荐了,返回首页