代码这么写的
Collection<Class<?>> classes = Scans.me().scanPackage("com.zntech.cpms.huawei.provider.repository.entity");
if (classes != null && !classes.isEmpty()){
for(Class<?> aClass : classes){
Table isTable = aClass.getAnnotation(Table.class);
if(isTable != null){
log.info("发现实体:{}", aClass.getName());
nutDao.create(aClass, false);
Daos.migration(nutDao, aClass, true, false, false);
}
}
}
docker上日志
[2020-07-13 16:51:04:625] [DEBUG] org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:221) Database info --> MYSQL:[MySQL - 5.6.36]
[2020-07-13 16:51:04:631] [INFO] com.zntech.cpms.huawei.provider.config.DbConfig.getSqlTemplate(DbConfig.java:31) 自动建表。。。。。。。。。。
[2020-07-13 16:51:04:643] [DEBUG] org.nutz.resource.Scans.printLocations(Scans.java:527) Locations count=2 time use 6ms
[2020-07-13 16:51:04:647] [DEBUG] org.nutz.resource.Scans.scan(Scans.java:280) Found 0 resource by src( com/zntech/cpms/huawei/provider/repository/entity/ ) , regex( ^.+[.]class$ )
大佬来帮我分析下啥原因