Blame view

src/main/java/com/huaheng/HuaHengApplication.java 2.3 KB
tangying authored
1
2
package com.huaheng;
lihailong authored
3
4
import com.huaheng.pc.system.canal.utils.CanalClient;
tangying authored
5
import org.mybatis.spring.annotation.MapperScan;
6
import org.springframework.boot.CommandLineRunner;
tangying authored
7
8
9
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
xqs authored
10
11
12
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
tangying authored
13
14
15
import javax.annotation.Resource;
tangying authored
16
17
/**
 * 启动程序
lector authored
18
 *
tangying authored
19
20
 * @author huaheng
 */
21
@MapperScan({"com.huaheng.pc.**.**.mapper"})
tangying authored
22
23
//添加SecurityAutoConfiguration.class,防止报java.lang.ArrayStoreException错
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
24
public class HuaHengApplication{
xqs authored
25
26
27
28
29
30
    @Bean // 此处相当于将undertow server注入到spring-context 中,这里相对于tomcat设置要多此动作
    public ServletWebServerFactory servletContainer() {
        UndertowServletWebServerFactory undertow = new UndertowServletWebServerFactory();
        return undertow;
    }
lihailong authored
31
    public static void main(String[] args) throws Exception {
tangying authored
32
        // System.setProperty("spring.devtools.restart.enabled", "false");
33
        System.setProperty("java.awt.headless","false");
tangying authored
34
        SpringApplication.run(HuaHengApplication.class, args);
xqs authored
35
36
        System.out.println("***************  华恒WMS启动成功JAR  ***************\n" +
                " >>>     WMS启动成功JAR!     <<<  \n"+
游杰 authored
37
38
39
40
41
42
43
44
45
46
47
48
49
                "     へ     /|▓\n"+
                "    /\7   ∠_/\n"+
                "    / │   / /\n"+
                "    │ Z _,< /  〈ヽ\n"+
                "    │  `   ヽ    / 〉\n"+
                "    Y     `/  / 〉\n"+
                "   ( ●  ヽ  ● /. 〈 /\n"+
                "  () (  | \  〈 \\n"+
                "    >_ ' _ . '│  //\n"+
                "   /へ    / )<| \\\n"+
                "   ヽ_)  (_/  │//\n"+
                "   7       | /\n"+
                "   >―r` ̄ ̄` `―_' \n"
tangying authored
50
51
52

        );
    }
游杰 authored
53
}