代码说明
This commit is contained in:
34
logs/app.log
Normal file
34
logs/app.log
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
2026-01-19 14:28:04.634 [main] INFO com.example.sso.SsoApplication - Starting SsoApplication on 夜愿 with PID 173808 (D:\taxi\TaxiGit\aikefu\target\classes started by 李嘉卓 in D:\taxi\TaxiGit\aikefu)
|
||||||
|
2026-01-19 14:28:04.636 [main] INFO com.example.sso.SsoApplication - No active profile set, falling back to default profiles: default
|
||||||
|
2026-01-19 14:28:05.074 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8092 (http)
|
||||||
|
2026-01-19 14:28:05.078 [main] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8092"]
|
||||||
|
2026-01-19 14:28:05.078 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
|
||||||
|
2026-01-19 14:28:05.078 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27]
|
||||||
|
2026-01-19 14:28:05.137 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
|
||||||
|
2026-01-19 14:28:05.137 [main] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 447 ms
|
||||||
|
2026-01-19 14:28:05.215 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor'
|
||||||
|
2026-01-19 14:28:05.275 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler'
|
||||||
|
2026-01-19 14:28:05.287 [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8092"]
|
||||||
|
2026-01-19 14:28:05.293 [main] INFO o.a.coyote.http11.Http11NioProtocol - Pausing ProtocolHandler ["http-nio-8092"]
|
||||||
|
2026-01-19 14:28:05.293 [main] INFO o.a.catalina.core.StandardService - Stopping service [Tomcat]
|
||||||
|
2026-01-19 14:28:05.295 [main] INFO o.a.coyote.http11.Http11NioProtocol - Stopping ProtocolHandler ["http-nio-8092"]
|
||||||
|
2026-01-19 14:28:05.296 [main] INFO o.a.coyote.http11.Http11NioProtocol - Destroying ProtocolHandler ["http-nio-8092"]
|
||||||
|
2026-01-19 14:28:05.297 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener -
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-19 14:28:05.299 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter -
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Web server failed to start. Port 8092 was already in use.
|
||||||
|
|
||||||
|
Action:
|
||||||
|
|
||||||
|
Identify and stop the process that's listening on port 8092 or configure this application to listen on another port.
|
||||||
|
|
||||||
|
2026-01-19 14:28:05.301 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
|
||||||
|
2026-01-19 14:28:05.301 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor'
|
||||||
5
pom.xml
5
pom.xml
@ -65,6 +65,11 @@
|
|||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>5.0.0</version> <!-- 请根据需要选择最新版本 -->
|
<version>5.0.0</version> <!-- 请根据需要选择最新版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
39
src/main/resources/logback-spring.xml
Normal file
39
src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<property name="LOG_PATH" value="./logs" />
|
||||||
|
<property name="LOG_FILE" value="app" />
|
||||||
|
<property name="MAX_HISTORY" value="30" />
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 按天滚动的文件输出 -->
|
||||||
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 当前日志文件 -->
|
||||||
|
<file>${LOG_PATH}/${LOG_FILE}.log</file>
|
||||||
|
|
||||||
|
<!-- 滚动策略 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 每天0点生成新文件 -->
|
||||||
|
<fileNamePattern>${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 保留30天 -->
|
||||||
|
<maxHistory>${MAX_HISTORY}</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
|
||||||
|
<!-- 关键:立即刷新,确保启动时有日志就立即创建文件 -->
|
||||||
|
<immediateFlush>true</immediateFlush>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
<appender-ref ref="FILE" />
|
||||||
|
</root>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user