zhangherong
4 天以前 0b8e5e2ee3c47e385816165826754d5cbb86faad
src/main/java/com/lxzn/LxznSystemCollectApplication.java
@@ -1,12 +1,15 @@
package com.lxzn;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.net.InetAddress;
import java.net.UnknownHostException;
@@ -15,8 +18,10 @@
* 单体启动类
* 报错提醒: 未集成mongo报错,可以打开启动类上面的注释 exclude={MongoAutoConfiguration.class}
*/
@EnableScheduling
@Slf4j
@SpringBootApplication
@SpringBootApplication(scanBasePackages = "com.lxzn", exclude = { DataSourceAutoConfiguration.class })
@MapperScan(value={"com.lxzn.modules.**.mapper*"})
public class LxznSystemCollectApplication extends SpringBootServletInitializer {
    @Override
@@ -33,6 +38,7 @@
        log.info("\n----------------------------------------------------------\n\t" +
                "Application Lxzn System Collect Server is running! Access URLs:\n\t" +
                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
                "----------------------------------------------------------");
    }