feat: 添加启动日志和Swagger访问信息

pull/872/head
Jie Zheng 2025-01-15 15:07:01 +08:00
parent de60187054
commit 733dd78e92
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@
package me.zhengjie;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
@ -33,6 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Zheng Jie
* @date 2018/11/15 9:20:19
*/
@Slf4j
@EnableAsync
@RestController
@Api(hidden = true)
@ -47,6 +49,10 @@ public class AppRun {
// 或者在 application.yml 添加文件路径,方便 killkill `cat /home/eladmin/app.pid`
springApplication.addListeners(new ApplicationPidFileWriter());
springApplication.run(args);
log.info("---------------------------------------------");
log.info("Local: {}", "http://localhost:8000");
log.info("Swagger: {}", "http://localhost:8000/doc.html");
log.info("---------------------------------------------");
}
@Bean