zoukankan      html  css  js  c++  java
  • springCloud 搭建Eureka

    @MapperScan("实体包名") //扫描的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);
    }
    };
    }

    }
  • 相关阅读:
    jQuery事件篇---高级事件
    Cookie处理
    JDBC技术
    JSP行为
    JSP九大内置对象
    JSP指令学习
    Oracle数据库学习之存储过程--提高程序执行的效率
    数据库操作之游标
    PL/SQL编程接触
    数据库数据的查询----连接查询
  • 原文地址:https://www.cnblogs.com/-mzh/p/11583628.html
Copyright © 2011-2022 走看看