@SpringBootApplication(scanBasePackages = {"com.alibaba.nacos.api.*","com.alibaba.nacos.server.*"})
@NacosPropertySource(dataId = "example", autoRefreshed = true)
public class SpringBootStaterApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootStaterApplication.class, args);
}
@Bean
public JPAQueryFactory jpaQueryFactory(EntityManager entityManager) {
return new JPAQueryFactory(entityManager);
}
}
上面要扫描的包的路径不一致,分别在不同的子模块中