BAEL-89 - Adding surefire, fixing formatting
This commit is contained in:
parent
0bc2aad035
commit
5f99e5aedd
@ -13,7 +13,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and()
|
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and()
|
||||||
.authorizeRequests().anyRequest().hasRole("ADMIN");
|
.authorizeRequests().anyRequest().hasRole("ADMIN");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,4 +19,5 @@
|
|||||||
<module>jetty-session-demo</module>
|
<module>jetty-session-demo</module>
|
||||||
<module>tomcat-session-demo</module>
|
<module>tomcat-session-demo</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -66,6 +66,20 @@
|
|||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/*ControllerTest.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
|
||||||
|
</properties>
|
||||||
</project>
|
</project>
|
@ -14,16 +14,16 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
@Autowired
|
@Autowired
|
||||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||||
auth
|
auth
|
||||||
.inMemoryAuthentication()
|
.inMemoryAuthentication()
|
||||||
.withUser("admin").password("password").roles("ADMIN");
|
.withUser("admin").password("password").roles("ADMIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.httpBasic().and()
|
.httpBasic().and()
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
.antMatchers("/tomcat/admin").hasRole("ADMIN")
|
.antMatchers("/tomcat/admin").hasRole("ADMIN")
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user