Commit ff11594b by Patryk Czarnik

Prosty SecutiryConfig "permitAll"

parent b79201ed
......@@ -7,6 +7,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class RootController {
@RequestMapping("/")
@ResponseBody
public String index() {
return "Spis treści";
}
@RequestMapping("/hello")
@ResponseBody
public String hello() {
......
package sklep.security;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
public class SecurityConfig {
@Bean
SecurityFilterChain setHttpSecurity(HttpSecurity httpSecurity) throws Exception {
httpSecurity.authorizeHttpRequests()
.anyRequest().permitAll()
;
return httpSecurity.build();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment