LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setPackagesToScan("com.jinyi.ihome.module.*.domain");
命名數(shù)據(jù)庫表對應(yīng)實體時候,其包路徑必須嚴(yán)格按照配置好的路徑命名,否則啟動時候會報如下錯誤:
Caused by: java.lang.IllegalArgumentException: Not an managed type: class com.jinyi.ihome.module.hire.domian.Hire