LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setPackagesToScan("com.jinyi.ihome.module.*.domain");
命名数据库表对应实体时候,其包路径必须严格按照配置好的路径命名,否则启动时候会报如下错误:
Caused by: java.lang.IllegalArgumentException: Not an managed type: class com.jinyi.ihome.module.hire.domian.Hire