springCloud 搭建Eureka
2020-12-13 15:30
标签:adb app pat cti source org toc scanner mapper springCloud 搭建Eureka 标签:adb app pat cti source org toc scanner mapper 原文地址:https://www.cnblogs.com/-mzh/p/11583628.html@MapperScan("com.cciinet.erp.*.*.dao") //扫描的mapper
@SpringBootApplication(exclude = {org.activiti.spring.boot.SecurityAutoConfiguration.class, SecurityAutoConfiguration.class})
@EnableFeignClients
@ServletComponentScan
@EnableEurekaClient
//@EnableScheduling
@ImportResource // (locations = {"classpath:spring-context-jedis.xml"}) //(locations = {"classpath:spring-context-shiro.xml"})
public class ErpApplication {
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// // 注意这里要指向原先用main方法执行的Application启动类
// return builder.sources(ClientApplication.class, WebConfig.class);
// }
public static void main(String[] args) {
new SpringApplicationBuilder().sources(ErpApplication.class, WebConfigBeans.class).run(args);
}
@LoadBalanced
@Bean
RestTemplate restTemplate(){
return new RestTemplate();
}
// 解决tomcat扫描mainfast的jar报错问题
@Bean
public TomcatServletWebServerFactory tomcatFactory() {
return new TomcatServletWebServerFactory() {
@Override
protected void postProcessContext(Context context) {
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
}
};
}
}
上一篇:HTML和CSS的复习总结
文章标题:springCloud 搭建Eureka
文章链接:http://soscw.com/index.php/essay/35198.html