File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed 
src/main/java/br/com/concrete/mock/infra/controller Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ package  br .com .concrete .mock .infra .controller ;
2+ 
3+ import  org .springframework .beans .factory .annotation .Autowired ;
4+ import  org .springframework .boot .SpringApplication ;
5+ import  org .springframework .context .ApplicationContext ;
6+ import  org .springframework .web .bind .annotation .RequestMapping ;
7+ import  org .springframework .web .bind .annotation .RestController ;
8+ 
9+ import  static  org .springframework .web .bind .annotation .RequestMethod .POST ;
10+ 
11+ @ RestController 
12+ public  class  ShutdownController  {
13+ 
14+     @ Autowired 
15+     private  ApplicationContext  appContext ;
16+ 
17+     @ RequestMapping (value  = "/shutdown" , method  = POST )
18+     public  void  initiateShutdown () {
19+         SpringApplication .exit (appContext );
20+     }
21+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments