Files
material-manage-service/src/main/java/mjkf/xinke/Application.java
2023-10-13 16:40:37 +08:00

53 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package mjkf.xinke;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
* SpringBoot方式启动类
*
*
* @date 2021/12/18 16:57
*/
@Slf4j
@EnableSwagger2WebMvc
@RestController
@SpringBootApplication
public class Application {
/* 解决druid 日志报错discard long time none received connection:xxx */
static {
System.setProperty("druid.mysql.usePingMethod","false");
}
/**
* 主启动函数
*
*
* @date 2022/7/30 21:42
*/
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(Application.class);
springApplication.setBannerMode(Banner.Mode.OFF);
springApplication.run(args);
log.info(">>> {}", Application.class.getSimpleName().toUpperCase() + " STARTING SUCCESS");
}
/**
* 首页
*
*
* @date 2022/7/8 14:22
**/
@GetMapping("/")
public String index() {
return "WELCOME";
}
}