Blame view

src/main/java/com/huaheng/HuaHengApplication.java 2.1 KB
tangying authored
1
2
3
4
5
6
package com.huaheng;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
xqs authored
7
8
9
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
tangying authored
10
11
12

/**
 * 启动程序
lector authored
13
 *
tangying authored
14
15
 * @author huaheng
 */
16
@MapperScan({"com.huaheng.pc.**.**.mapper"})
tangying authored
17
//添加SecurityAutoConfiguration.class,防止报java.lang.ArrayStoreException错
易文鹏 authored
18
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
19
public class HuaHengApplication {
xqs authored
20
21
22
23
24
25
26

    @Bean // 此处相当于将undertow server注入到spring-context 中,这里相对于tomcat设置要多此动作
    public ServletWebServerFactory servletContainer() {
        UndertowServletWebServerFactory undertow = new UndertowServletWebServerFactory();
        return undertow;
    }
27
    public static void main(String[] args) {
tangying authored
28
29
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(HuaHengApplication.class, args);
xqs authored
30
        System.out.println("***************  华恒WMS启动成功JAR  ***************\n" +
31
32
33
34
35
36
37
38
39
40
41
42
43
                " >>>     WMS启动成功JAR!     <<<  \n" +
                "     へ     /|▓\n" +
                "    /\7   ∠_/\n" +
                "    / │   / /\n" +
                "    │ Z _,< /  〈ヽ\n" +
                "    │  `   ヽ    / 〉\n" +
                "    Y     `/  / 〉\n" +
                "   ( ●  ヽ  ● /. 〈 /\n" +
                "  () (  | \  〈 \\n" +
                "    >_ ' _ . '│  //\n" +
                "   /へ    / )<| \\\n" +
                "   ヽ_)  (_/  │//\n" +
                "   7       | /\n" +
游杰 authored
44
                "   >―r` ̄ ̄` `―_' \n"
tangying authored
45
46
47

        );
    }
48
}