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 | ||||
|     protected void configure(HttpSecurity http) throws Exception { | ||||
|         http | ||||
|             .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and() | ||||
|             .authorizeRequests().anyRequest().hasRole("ADMIN"); | ||||
|                 .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and() | ||||
|                 .authorizeRequests().anyRequest().hasRole("ADMIN"); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -19,4 +19,5 @@ | ||||
|         <module>jetty-session-demo</module> | ||||
|         <module>tomcat-session-demo</module> | ||||
|     </modules> | ||||
| 
 | ||||
| </project> | ||||
| @ -66,6 +66,20 @@ | ||||
|                     <target>1.8</target> | ||||
|                 </configuration> | ||||
|             </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> | ||||
|     </build> | ||||
| 
 | ||||
|     <properties> | ||||
|         <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> | ||||
|     </properties> | ||||
| </project> | ||||
| @ -14,16 +14,16 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { | ||||
|     @Autowired | ||||
|     public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { | ||||
|         auth | ||||
|             .inMemoryAuthentication() | ||||
|             .withUser("admin").password("password").roles("ADMIN"); | ||||
|                 .inMemoryAuthentication() | ||||
|                 .withUser("admin").password("password").roles("ADMIN"); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     protected void configure(HttpSecurity http) throws Exception { | ||||
|         http | ||||
|             .httpBasic().and() | ||||
|             .authorizeRequests() | ||||
|             .antMatchers("/tomcat/admin").hasRole("ADMIN") | ||||
|             .anyRequest().authenticated(); | ||||
|                 .httpBasic().and() | ||||
|                 .authorizeRequests() | ||||
|                 .antMatchers("/tomcat/admin").hasRole("ADMIN") | ||||
|                 .anyRequest().authenticated(); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user