File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed 
SpringBootNotice/src/main/java/com/tistory/heowc Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1111@ Component 
1212@ Transactional 
1313public  class  InitRunner  implements  ApplicationRunner  {
14- 	
15- 	@ Autowired  NoticeRepository  repository ;
16- 	
14+ 
15+ 	@ Autowired 
16+     private  NoticeRepository  repository ;
17+ 
1718	@ Override 
1819	public  void  run (ApplicationArguments  args ) throws  Exception  {
19- 		for  (int  i  = 0 ; i  < 50 ; i ++) {
20- 			repository .save (new  Notice (( long )  i , "title "  + i , "content "  + i ));
20+ 		for  (long  i  = 0 ; i  < 50 ; i ++) {
21+ 			repository .save (new  Notice (i , "title "  + i , "content "  + i ));
2122		}
2223	}
2324}
Original file line number Diff line number Diff line change 55
66import  jakarta .persistence .Column ;
77import  jakarta .persistence .Entity ;
8- import  jakarta .persistence .GeneratedValue ;
98import  jakarta .persistence .Id ;
109import  java .io .Serializable ;
1110
1514public  class  Notice  implements  Serializable  {
1615
1716    @ Id 
18-     @ GeneratedValue 
1917    private  Long  idx ;
2018    private  String  title ;
2119
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments