Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--security-context.xml -->
- <http pattern="/resources/**" security="none"/>
- <http use-expressions="true" entry-point-ref="authenticationEntryPoint">
- <intercept-url pattern="/login.htm*" access="isAnonymous()" />
- <intercept-url pattern="/*" access="isAuthenticated()" />
- <form-login authentication-failure-url="/login.htm" />
- <logout />
- </http>
- <authentication-manager alias="authenticationManager">
- <authentication-provider user-service-ref="usuarioService">
- <password-encoder ref="passwordEncoder" />
- </authentication-provider>
- </authentication-manager>
- <!-- Login form ajax redirection -->
- <beans:bean id="authenticationEntryPoint" class="com.dnp.security.impl.JsonAwareAuthenticationEntryPoint">
- <beans:constructor-arg name="loginFormUrl" value="/login.htm" />
- </beans:bean>
- <!-- Password encoder -->
- <beans:bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />
- <!-- servlet-context.xml -->
- <!-- Secure controller actions -->
- <sec:global-method-security pre-post-annotations="enabled" />
- <!-- Enables the Spring MVC @Controller programming model -->
- <annotation-driven conversion-service="conversionService" />
- <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
- <resources mapping="/resources/**" location="/resources/" />
- <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
- <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <beans:property name="prefix" value="/WEB-INF/views/" />
- <beans:property name="suffix" value=".jsp" />
- </beans:bean>
- <context:component-scan base-package="com.dnp.web.controllers" />
- <!-- Enable @Valid for @RequestBody -->
- <beans:bean class="com.dnp.util.RequestBodyValidatorAspect" />
- <!-- Flash service -->
- <beans:bean id="flashService" class="com.dnp.service.impl.FlashServiceImpl" scope="session">
- <aop:scoped-proxy proxy-target-class="false" />
- </beans:bean>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement