removed unwanted path from web security config
This commit is contained in:
parent
7d1e22b44f
commit
8de92f7f4c
|
@ -106,6 +106,10 @@
|
|||
<version>${ehcache-core.version}</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan(basePackages = {"com.baeldung.voter"})
|
||||
@ComponentScan(basePackages = {"com.baeldung.roles.voter"})
|
||||
public class VoterApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
// @formatter: off
|
||||
http
|
||||
// needed so our login could work
|
||||
.csrf().disable().authorizeRequests().anyRequest().authenticated().accessDecisionManager(accessDecisionManager()).antMatchers("/").hasAnyRole("ROLE_ADMIN", "ROLE_USER").and().formLogin().permitAll().and().logout().permitAll()
|
||||
.csrf().disable().authorizeRequests().anyRequest().authenticated().accessDecisionManager(accessDecisionManager()).and().formLogin().permitAll().and().logout().permitAll()
|
||||
.deleteCookies("JSESSIONID").logoutSuccessUrl("/login");
|
||||
// @formatter: on
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue