JAVA-30337 Fix failing module spring-security-web-boot-2 schema for spring-security-login-redirect (#16167)
Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
parent
688005d0c5
commit
411bea8497
|
@ -5,6 +5,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@SpringBootApplication
|
||||
//Comment this line when you want to use the class definition for defining Spring security rules, LoginRedirectSecurityConfig.
|
||||
// Uncomment the annotations from LoginRedirectSecurityConfig.
|
||||
@ImportResource({"classpath*:spring-security-login-redirect.xml"})
|
||||
class LoginRedirectApplication {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -13,8 +13,9 @@ import org.springframework.security.provisioning.InMemoryUserDetailsManager;
|
|||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
//if you use xsd configuration (spring-security-login-redirect.xml) please comment the annotations from this class, because it will overlap with configuration from this class
|
||||
/*@Configuration
|
||||
@EnableWebSecurity*/
|
||||
class LoginRedirectSecurityConfig {
|
||||
|
||||
private static final String LOGIN_USER = "/loginUser";
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
http://www.springframework.org/schema/security/spring-security-5.2.xsd
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
https://www.springframework.org/schema/security/spring-security.xsd
|
||||
http://www.springframework.org/schema/beans
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<security:authentication-manager>
|
||||
<security:authentication-provider>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<mvc:interceptors>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/loginUser"/>
|
||||
<bean class="com.baeldung.loginredirect.LoginPageInterceptor"/>
|
||||
<beans:bean class="com.baeldung.loginredirect.LoginPageInterceptor"/>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue