mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	chore: 优化后端程序启动成功输出内容
This commit is contained in:
		@@ -361,7 +361,7 @@ git clone https://github.com/Charles7c/continew-admin.git
 | 
				
			|||||||
# [3.也可以在 IntelliJ IDEA 中直接配置程序启动环境变量(DB_HOST、DB_PORT、DB_USER、DB_PWD、DB_NAME;REDIS_HOST、REDIS_PORT、REDIS_PWD、REDIS_DB)]
 | 
					# [3.也可以在 IntelliJ IDEA 中直接配置程序启动环境变量(DB_HOST、DB_PORT、DB_USER、DB_PWD、DB_NAME;REDIS_HOST、REDIS_PORT、REDIS_PWD、REDIS_DB)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 4.启动程序
 | 
					# 4.启动程序
 | 
				
			||||||
# 4.1 启动成功:访问 http://localhost:8000/,页面输出:ContiNew Admin backend service started successfully.
 | 
					# 4.1 启动成功:访问 http://localhost:8000/,页面输出:Xxx started successfully.
 | 
				
			||||||
# 4.2 接口文档:http://localhost:8000/doc.html
 | 
					# 4.2 接口文档:http://localhost:8000/doc.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 5.部署
 | 
					# 5.部署
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,7 +70,7 @@ public class ContiNewAdminApplication implements ApplicationRunner {
 | 
				
			|||||||
    @SaIgnore
 | 
					    @SaIgnore
 | 
				
			||||||
    @GetMapping("/")
 | 
					    @GetMapping("/")
 | 
				
			||||||
    public String index() {
 | 
					    public String index() {
 | 
				
			||||||
        return String.format("%s backend service started successfully.", projectProperties.getName());
 | 
					        return String.format("%s service started successfully.", projectProperties.getName());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
@@ -79,13 +79,13 @@ public class ContiNewAdminApplication implements ApplicationRunner {
 | 
				
			|||||||
        Integer port = serverProperties.getPort();
 | 
					        Integer port = serverProperties.getPort();
 | 
				
			||||||
        String contextPath = serverProperties.getServlet().getContextPath();
 | 
					        String contextPath = serverProperties.getServlet().getContextPath();
 | 
				
			||||||
        String baseUrl = URLUtil.normalize(String.format("%s:%s%s", hostAddress, port, contextPath));
 | 
					        String baseUrl = URLUtil.normalize(String.format("%s:%s%s", hostAddress, port, contextPath));
 | 
				
			||||||
        log.info("------------------------------------------------------");
 | 
					        log.info("----------------------------------------------");
 | 
				
			||||||
        log.info("{} backend service started successfully.", projectProperties.getName());
 | 
					        log.info("{} service started successfully.", projectProperties.getName());
 | 
				
			||||||
        log.info("后端 API 地址:{}", baseUrl);
 | 
					        log.info("API 地址:{}", baseUrl);
 | 
				
			||||||
        Boolean docEnabled = Convert.toBool(SpringUtil.getProperty("springdoc.swagger-ui.enabled"));
 | 
					        Boolean docEnabled = Convert.toBool(SpringUtil.getProperty("springdoc.swagger-ui.enabled"));
 | 
				
			||||||
        if (Boolean.TRUE.equals(docEnabled)) {
 | 
					        if (Boolean.TRUE.equals(docEnabled)) {
 | 
				
			||||||
            log.info("后端 API 文档:{}/doc.html", baseUrl);
 | 
					            log.info("API 文档:{}/doc.html", baseUrl);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        log.info("------------------------------------------------------");
 | 
					        log.info("----------------------------------------------");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user