File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed 
main/java/com/example/java Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 1- package  com .example .config ;
1+ package  com .example .java . config ;
22
33import  org .springframework .context .annotation .Configuration ;
44import  org .springframework .scheduling .annotation .AsyncConfigurerSupport ;
Original file line number Diff line number Diff line change 1- package  com .example .service ;
1+ package  com .example .java . service ;
22
33import  org .slf4j .Logger ;
44import  org .slf4j .LoggerFactory ;
@@ -11,13 +11,21 @@ public class BasicService {
1111	private  static  final  Logger  logger  = LoggerFactory .getLogger (BasicService .class );
1212
1313	@ Async 
14- 	public  void  onAsync () throws  InterruptedException  {
15- 		Thread .sleep (1000 );
14+ 	public  void  onAsync () {
15+ 		try  {
16+ 			Thread .sleep (1000 );
17+ 		} catch  (InterruptedException  e ) {
18+ 			e .printStackTrace ();
19+ 		}
1620		logger .info ("onAsync" );
1721	}
1822
19- 	public  void  onSync () throws  InterruptedException  {
20- 		Thread .sleep (1000 );
23+ 	public  void  onSync () {
24+ 		try  {
25+ 			Thread .sleep (1000 );
26+ 		} catch  (InterruptedException  e ) {
27+ 			e .printStackTrace ();
28+ 		}
2129		logger .info ("onSync" );
2230	}
2331}
Original file line number Diff line number Diff line change 1- package  com .example .web ;
1+ package  com .example .java . web ;
22
3- import  com .example .service .BasicService ;
3+ import  com .example .java . service .BasicService ;
44import  org .slf4j .Logger ;
55import  org .slf4j .LoggerFactory ;
66import  org .springframework .beans .factory .annotation .Autowired ;
Original file line number Diff line number Diff line change 11package  com .example ;
22
3- import  com .example .service .BasicService ;
3+ import  com .example .java . service .BasicService ;
44import  org .junit .Test ;
5- import  org .junit .rules .Stopwatch ;
65import  org .junit .runner .RunWith ;
76import  org .springframework .beans .factory .annotation .Autowired ;
87import  org .springframework .boot .test .context .SpringBootTest ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments