<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">
<!--扫描控制包-->
<context:component-scan base-package="ssm.shiro.controller"></context:component-scan>
<!--声明以注解的方式配置spring mvc-->
<mvc:annotation-driven></mvc:annotation-driven>

<!--restful风格:会默认的在web.xml中配置一个名叫default的servlet,这个servlet用来处理所有的静态资源,目前只能处理css资源,
js可以单独配置-->
<!--<mvc:default-servlet-handler></mvc:default-servlet-handler>-->

<!--配置spring mvc的内置的视图解析器-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!--配置视图的前缀-->
<property name="prefix" value="/WEB-INF/jsp/"></property>
<!--配置视图的后缀-->
<property name="suffix" value=".jsp"></property>
</bean>
<!--开启aop-->
<aop:config proxy-target-class="true"></aop:config>
<!--声明以注解的方式授权-->
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"></property>
</bean>
<!--配置统一的异常处理器-->
<bean ></property>
</bean>
</beans>

相关文章:

  • 2021-12-05
  • 2021-10-24
  • 2021-10-12
  • 2021-05-02
  • 2021-06-11
  • 2021-10-04
  • 2021-09-11
  • 2021-11-01
猜你喜欢
  • 2021-11-19
  • 2021-11-19
  • 2021-07-03
  • 2021-04-14
  • 2021-11-29
  • 2020-06-11
  • 2019-09-26
相关资源
相似解决方案