File tree Expand file tree Collapse file tree
com/baeldung/produceimage
test/java/org/baeldung/client
spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .EnableAutoConfiguration ;
55import org .springframework .context .annotation .ComponentScan ;
6- import org .springframework .context .annotation .PropertySource ;
76
87@ EnableAutoConfiguration
98@ ComponentScan ("com.baeldung.produceimage" )
10- public class Application {
9+ public class ImageApplication {
1110 public static void main (final String [] args ) {
12- SpringApplication .run (Application .class , args );
11+ SpringApplication .run (ImageApplication .class , args );
1312 }
1413}
Original file line number Diff line number Diff line change 77
88@ EnableAutoConfiguration
99@ ComponentScan ("org.baeldung" )
10- public class Application extends WebMvcConfigurerAdapter {
10+ public class MainApplication extends WebMvcConfigurerAdapter {
1111
1212 public static void main (final String [] args ) {
13- SpringApplication .run (Application .class , args );
13+ SpringApplication .run (MainApplication .class , args );
1414 }
1515
1616}
Original file line number Diff line number Diff line change 1919import org .springframework .web .servlet .support .ServletUriComponentsBuilder ;
2020
2121@ Controller
22- @ RequestMapping (value = "/myfoos " )
22+ @ RequestMapping (value = "/foos " )
2323public class MyFooController {
2424
2525 private final Map <Long , Foo > myfoos ;
Original file line number Diff line number Diff line change 3636public class RestTemplateBasicLiveTest {
3737
3838 private RestTemplate restTemplate ;
39- private static final String fooResourceUrl = "http://localhost:" + APPLICATION_PORT + "/spring-rest/myfoos " ;
39+ private static final String fooResourceUrl = "http://localhost:" + APPLICATION_PORT + "/spring-rest/foos " ;
4040
4141 @ Before
4242 public void beforeTest () {
Original file line number Diff line number Diff line change 2020public class TestRestTemplateBasicLiveTest {
2121
2222 private RestTemplate restTemplate ;
23- private static final String FOO_RESOURCE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest/myfoos " ;
23+ private static final String FOO_RESOURCE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest/foos " ;
2424 private static final String URL_SECURED_BY_AUTHENTICATION = "http://httpbin.org/basic-auth/user/passwd" ;
2525 private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest" ;
2626
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
1414 private AuthenticationManager authenticationManager ;
1515
1616 @ Override
17- protected void configure (HttpSecurity http ) throws Exception {
17+ protected void configure (HttpSecurity http ) throws Exception { // @formatter:off
1818 http .requestMatchers ()
1919 .antMatchers ("/login" , "/oauth/authorize" )
2020 .and ()
@@ -24,15 +24,15 @@ protected void configure(HttpSecurity http) throws Exception {
2424 .and ()
2525 .formLogin ()
2626 .permitAll ();
27- }
27+ } // @formatter:on
2828
2929 @ Override
30- protected void configure (AuthenticationManagerBuilder auth ) throws Exception {
30+ protected void configure (AuthenticationManagerBuilder auth ) throws Exception { // @formatter:off
3131 auth .parentAuthenticationManager (authenticationManager )
3232 .inMemoryAuthentication ()
3333 .withUser ("john" )
3434 .password ("123" )
3535 .roles ("USER" );
36- }
36+ } // @formatter:on
3737
3838}
You can’t perform that action at this time.
0 commit comments