[JAVA-31203] Upgraded spring-cloud-config to spring boot 3 (#15861)
This commit is contained in:
parent
a4b26ac450
commit
c77c0deea5
|
@ -10,9 +10,10 @@
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung.spring.cloud</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>spring-cloud-modules</artifactId>
|
<artifactId>parent-boot-3</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../parent-boot-3</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<spring-cloud-dependencies.version>2021.0.3</spring-cloud-dependencies.version>
|
<spring-cloud-dependencies.version>2022.0.3</spring-cloud-dependencies.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -2,6 +2,7 @@ package com.baeldung.spring.cloud.config.server;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.security.config.Customizer;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.web.SecurityFilterChain;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
|
||||||
|
@ -10,13 +11,13 @@ public class SecurityConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
http.csrf()
|
http.csrf(csrf -> csrf.ignoringRequestMatchers(
|
||||||
.ignoringAntMatchers("/encrypt/**")
|
"/encrypt/**", "/decrypt/**"
|
||||||
.ignoringAntMatchers("/decrypt/**");
|
))
|
||||||
http.authorizeRequests((requests) -> requests.anyRequest()
|
.authorizeRequests(authz -> authz.anyRequest().authenticated())
|
||||||
.authenticated());
|
.formLogin(Customizer.withDefaults())
|
||||||
http.formLogin();
|
.httpBasic(Customizer.withDefaults());
|
||||||
http.httpBasic();
|
|
||||||
return http.build();
|
return http.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue