File tree 1 file changed +16
-1
lines changed
chucknorris-web/src/main/java/io/chucknorris/api
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
package io .chucknorris .api ;
2
2
3
+ import lombok .extern .slf4j .Slf4j ;
3
4
import org .springframework .boot .SpringApplication ;
4
5
import org .springframework .boot .autoconfigure .SpringBootApplication ;
6
+ import org .springframework .context .ApplicationListener ;
5
7
import org .springframework .context .annotation .ComponentScan ;
8
+ import org .springframework .context .event .ContextRefreshedEvent ;
6
9
import org .springframework .data .jpa .repository .config .EnableJpaAuditing ;
10
+ import org .springframework .web .servlet .mvc .method .annotation .RequestMappingHandlerMapping ;
7
11
8
12
@ ComponentScan (basePackages = { "io.chucknorris" })
9
13
@ EnableJpaAuditing
14
+ @ Slf4j
10
15
@ SpringBootApplication
11
- public class Application {
16
+ public class Application implements ApplicationListener <ContextRefreshedEvent > {
17
+
18
+ @ Override
19
+ public void onApplicationEvent (ContextRefreshedEvent event ) {
20
+ event
21
+ .getApplicationContext ()
22
+ .getBean (RequestMappingHandlerMapping .class )
23
+ .getHandlerMethods ()
24
+ .keySet ()
25
+ .forEach (it -> log .info ("Mapped endpoint: {}" , it ));
26
+ }
12
27
13
28
public static void main (String [] args ) {
14
29
SpringApplication .run (Application .class , args );
You can’t perform that action at this time.
0 commit comments