File tree Expand file tree Collapse file tree
java/com/baeldung/swaggerboot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import org .springframework .boot .SpringApplication ;
44import org .springframework .boot .autoconfigure .SpringBootApplication ;
5- import org .springframework .context .annotation .ComponentScan ;
65
76@ SpringBootApplication
8- @ ComponentScan (basePackages = {"com.baeldung" })
97public class Application {
108
119 public static void main (String [] args ) {
Load diff This file was deleted.
Original file line number Diff line number Diff line change 11package com .baeldung .swaggerboot .configuration ;
22
3- import com .fasterxml .classmate .TypeResolver ;
4- import org .springframework .beans .factory .annotation .Autowired ;
53import org .springframework .context .annotation .Bean ;
64import org .springframework .context .annotation .ComponentScan ;
75import org .springframework .context .annotation .Configuration ;
2119@ ComponentScan ("com.baeldung.swaggerboot.controller" )
2220public class SpringFoxConfig {
2321
24- @ Autowired
25- private TypeResolver typeResolver ;
26-
2722 private ApiInfo apiInfo () {
2823 return new ApiInfo (
2924 "My REST API" ,
Original file line number Diff line number Diff line change 11package com .baeldung .swaggerboot .controller ;
22
3- import com .baeldung .swaggerboot .services .RegularWebService ;
4- import com .baeldung .swaggerboot .transfer .CustomResponse ;
5- import org .springframework .beans .factory .annotation .Autowired ;
63import org .springframework .web .bind .annotation .GetMapping ;
74import org .springframework .web .bind .annotation .RestController ;
85
9- import static com .baeldung .swaggerboot .Constants .REGULAR_REST_URL ;
10-
116@ RestController
127public class RegularRestController {
138
14- @ Autowired
15- RegularWebService regularWebService ;
16-
17- @ GetMapping (REGULAR_REST_URL )
18- public CustomResponse getSession () {
19- return regularWebService .example ();
9+ @ GetMapping ("home" )
10+ public String getSession () {
11+ return "Hello" ;
2012 }
2113
2214}
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ spring.main.allow-bean-definition-overriding =true
You can’t perform that action at this time.
0 commit comments