fix: 调整项目路径
This commit is contained in:
52
src/main/java/mjkf/xinke/Application.java
Normal file
52
src/main/java/mjkf/xinke/Application.java
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user