spring mvc.xml profile

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<!- scanning control packet ->
<context: the Component-Base-Package Penalty for Scan = "ssm.shiro.controller"> </ context: the Component-Scan>
<- statement annotation MVC arranged the Spring -!>
<MVC: Annotation-Driven> </ mvc: annotation-driven>

<- restful Style:! default configuration in web.xml named the default servlet, the servlet to handle all static resources, can only deal with css resources,
JS can be individually configured ->
<-! - <mvc: default-servlet- handler> </ mvc: default-servlet-handler> ->

<! - Configuration of the built-in spring mvc viewresolver ->
<the bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver">
<! - configuration view prefix ->
<Property name = " prefix "value =" / the WEB-INF / JSP / "> </ Property>
<-! configuration view suffix ->
<Property name =." suffix "value =" JSP "> </ Property>
</ the bean >
<! - open AOP ->
<AOP: config Proxy-target-class = "to true"> </ AOP: config>
<- statement annotation authorize ->!
<bean class = "ORG. apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor ">
<Property name =" securityManager "REF =" securityManager "> </ Property>
</ the bean>
<! - exception handler configuration unified ->
<bean the above mentioned id = "exceptionResolver" class = "org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<! - Configuration of an abnormal jump interface ->
<Property name = "defaultErrorView" value = "error"> </ Property>
</ the bean>
</ Beans>

Guess you like

Origin www.cnblogs.com/yinziqiang0909/p/11206004.html