首页 > 其他分享 >springboot一定要添加扫描

springboot一定要添加扫描

时间:2022-11-08 15:47:22浏览次数:29  
标签:springboot 扫描 Start 添加 nbkj public

springboot一定要添加扫描,要不然有可能会找不到bean、service、controller之类的

@SpringBootApplication
@ComponentScan("com.nbkj.fossx.engine.repository")
@ComponentScan("com.nbkj.fossx.engine")
public class Start {
    public static void main(String[] args) {
        SpringApplication.run(Start.class,args);
    }
}

 

标签:springboot,扫描,Start,添加,nbkj,public
From: https://www.cnblogs.com/wYYBLH/p/16869878.html

相关文章