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);
    }
    };
    }

    }
  • 相关阅读:
    WPF元素之间的关系
    依赖属性
    多线程显示运行状态
    WPF 基本知识
    SQL 这个删除重复行怎么做
    路由事件
    WPF的数据邦定
    SQL对表中XML列的查询
    WMI访问注册表读取系统信息
    创建第一个WPF应用程序
  • 原文地址:https://www.cnblogs.com/-mzh/p/11583628.html
Copyright © 2011-2022 走看看