feat: 添加启动日志和Swagger访问信息
This commit is contained in:
parent
232bcc1c38
commit
9ce4838a68
@ -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;
|
||||
@ -30,6 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author Zheng Jie
|
||||
* @date 2018/11/15 9:20:19
|
||||
*/
|
||||
@Slf4j
|
||||
@EnableAsync
|
||||
@RestController
|
||||
@Api(hidden = true)
|
||||
@ -43,6 +45,11 @@ public class AppRun {
|
||||
// 或者在 application.yml 添加文件路径,方便 kill,kill `cat /home/eladmin/app.pid`
|
||||
springApplication.addListeners(new ApplicationPidFileWriter());
|
||||
springApplication.run(args);
|
||||
log.info("---------------------------------------------");
|
||||
log.info("Backend service started successfully");
|
||||
log.info("Local: {}", "http://localhost:8000");
|
||||
log.info("Swagger: {}", "http://localhost:8000/doc.html");
|
||||
log.info("---------------------------------------------");
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
Loading…
Reference in New Issue
Block a user