Last change
on this file was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | package com.project.beautycenter.config;
|
---|
2 |
|
---|
3 | import org.springframework.beans.factory.annotation.Autowired;
|
---|
4 | import org.springframework.context.annotation.Configuration;
|
---|
5 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
---|
6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
---|
7 | import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
---|
8 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
---|
9 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
---|
10 | import org.springframework.security.core.userdetails.UserDetailsService;
|
---|
11 |
|
---|
12 | @Configuration
|
---|
13 | @EnableWebSecurity
|
---|
14 | public class securityConfig extends WebSecurityConfigurerAdapter {
|
---|
15 |
|
---|
16 | @Autowired
|
---|
17 | private UserDetailsService userDetailsService;
|
---|
18 |
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void configure(WebSecurity web) throws Exception {
|
---|
22 |
|
---|
23 | web.ignoring().antMatchers("/**");
|
---|
24 | }
|
---|
25 |
|
---|
26 | @Override
|
---|
27 | protected void configure(HttpSecurity http) throws Exception {
|
---|
28 | http.sessionManagement().enableSessionUrlRewriting(false);
|
---|
29 |
|
---|
30 | }
|
---|
31 |
|
---|
32 | @Override
|
---|
33 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
---|
34 | auth.userDetailsService(this.userDetailsService);
|
---|
35 |
|
---|
36 | }
|
---|
37 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.