Advertisement
Guest User

Untitled

a guest
Mar 16th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.10 KB | None | 0 0
  1. <!--security-context.xml -->
  2.     <http pattern="/resources/**" security="none"/>
  3.    
  4.     <http use-expressions="true" entry-point-ref="authenticationEntryPoint">
  5.         <intercept-url pattern="/login.htm*" access="isAnonymous()" />
  6.         <intercept-url pattern="/*" access="isAuthenticated()" />
  7.         <form-login authentication-failure-url="/login.htm" />
  8.         <logout />
  9.     </http>
  10.    
  11.     <authentication-manager alias="authenticationManager">
  12.         <authentication-provider user-service-ref="usuarioService">
  13.             <password-encoder ref="passwordEncoder" />
  14.         </authentication-provider>
  15.     </authentication-manager>
  16.    
  17.     <!-- Login form ajax redirection -->
  18.     <beans:bean id="authenticationEntryPoint" class="com.dnp.security.impl.JsonAwareAuthenticationEntryPoint">
  19.         <beans:constructor-arg name="loginFormUrl" value="/login.htm" />
  20.     </beans:bean>
  21.    
  22.     <!-- Password encoder -->
  23.     <beans:bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />
  24.  
  25. <!-- servlet-context.xml -->
  26.     <!-- Secure controller actions -->
  27.     <sec:global-method-security pre-post-annotations="enabled" />
  28.    
  29.     <!-- Enables the Spring MVC @Controller programming model -->
  30.     <annotation-driven conversion-service="conversionService" />
  31.  
  32.     <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
  33.     <resources mapping="/resources/**" location="/resources/" />
  34.  
  35.     <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
  36.     <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  37.         <beans:property name="prefix" value="/WEB-INF/views/" />
  38.         <beans:property name="suffix" value=".jsp" />
  39.     </beans:bean>
  40.    
  41.     <context:component-scan base-package="com.dnp.web.controllers" />
  42.    
  43.     <!-- Enable @Valid for @RequestBody -->
  44.     <beans:bean class="com.dnp.util.RequestBodyValidatorAspect" />
  45.    
  46.     <!-- Flash service -->
  47.     <beans:bean id="flashService" class="com.dnp.service.impl.FlashServiceImpl" scope="session">
  48.         <aop:scoped-proxy proxy-target-class="false" />
  49.     </beans:bean>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement