File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
springboot/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot
spring/pet-store/src/main/java/com/amazonaws/serverless/sample/spring Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1313package com .amazonaws .serverless .sample .spring ;
1414
1515import org .springframework .context .annotation .Bean ;
16- import org .springframework .context .annotation .ComponentScan ;
1716import org .springframework .context .annotation .Configuration ;
17+ import org .springframework .context .annotation .Import ;
1818import org .springframework .web .servlet .HandlerAdapter ;
1919import org .springframework .web .servlet .HandlerExceptionResolver ;
2020import org .springframework .web .servlet .HandlerMapping ;
2727
2828
2929@ Configuration
30- @ ComponentScan ( "com.amazonaws.serverless.sample.spring" )
30+ @ Import ({ PetsController . class } )
3131public class PetStoreSpringAppConfig {
3232 /*
3333 * Create required HandlerMapping, to avoid several default HandlerMapping instances being created
Original file line number Diff line number Diff line change 11package com .amazonaws .serverless .sample .springboot ;
22
3+ import com .amazonaws .serverless .sample .springboot .controller .PetsController ;
4+
35import org .springframework .beans .factory .annotation .Value ;
46import org .springframework .boot .SpringApplication ;
57import org .springframework .boot .autoconfigure .SpringBootApplication ;
68import org .springframework .boot .web .support .SpringBootServletInitializer ;
79import org .springframework .context .annotation .Bean ;
8- import org .springframework .context .annotation .ComponentScan ;
10+ import org .springframework .context .annotation .Import ;
911import org .springframework .web .servlet .HandlerAdapter ;
1012import org .springframework .web .servlet .HandlerExceptionResolver ;
1113import org .springframework .web .servlet .HandlerMapping ;
1820
1921
2022@ SpringBootApplication
21- @ ComponentScan ( basePackages = "com.amazonaws.serverless.sample.springboot.controller" )
23+ @ Import ({ PetsController . class } )
2224public class Application extends SpringBootServletInitializer {
2325
2426 // silence console logging
You can’t perform that action at this time.
0 commit comments