Spring boot 我的spring boot应用程序被卡住了一段时间,在启动过程中存在了一段时间
如何调试spring启动应用程序?下面是日志语句 2019-12-08 22:19:43622主信息Log4j似乎在Servlet环境中运行,但没有可用的Log4j web模块。如果您想要更好的web容器支持,请将log4j web JAR添加到您的web存档或服务器库目录中。 2019-12-08 22:19:44823主信息Log4j似乎在Servlet环境中运行,但没有可用的Log4j web模块。如果您想要更好的web容器支持,请将log4j web JAR添加到您的web存档或服务器库目录中``` http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0Spring boot 我的spring boot应用程序被卡住了一段时间,在启动过程中存在了一段时间,spring-boot,Spring Boot,如何调试spring启动应用程序?下面是日志语句 2019-12-08 22:19:43622主信息Log4j似乎在Servlet环境中运行,但没有可用的Log4j web模块。如果您想要更好的web容器支持,请将log4j web JAR添加到您的web存档或服务器库目录中。 2019-12-08 22:19:44823主信息Log4j似乎在Servlet环境中运行,但没有可用的Log4j web模块。如果您想要更好的web容器支持,请将log4j web JAR添加到您的web存档或服务器库
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.0.RELEASE</version>
</parent>
<groupId>com.xyz</groupId>
<artifactId>xyz-api</artifactId>
<name>xyz-api</name>
<version>${project-version}</version>
<packaging>jar</packaging>
<description>xyz api</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<project-version>0.1.0-SNAPSHOT</project-version>
<!-- For SonarQube coverage -->
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
</properties>
<profiles>
<profile>
<id>integration-test</id>
<properties>
<skip.integration.tests>false</skip.integration.tests>
<skip.unit.tests>true</skip.unit.tests>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.xyz</groupId>
<artifactId>common-services</artifactId>
<version>1.3.33</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.logback-extensions</groupId>
<artifactId>logback-ext-loggly</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.xyz</groupId>
<artifactId>commons-api</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>com.xyz</groupId>
<artifactId>caching</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.3.0</version>
</dependency>
<!-- Dependencies for ES -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>6.2.4</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.2.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-oauth2 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
<version>1.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>5.0.3.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.xyz</groupId>
<artifactId>abc-xyz-validator</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mailapi</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Dependencies for test-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>add-integration-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test-integration/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
向我们展示您的maven pom.xml或gradle buildscript和application.properties或application.yaml。请添加更多信息。在说明中添加了pom.xml@Want2LearnI正在使用java-jar选项运行我的应用程序,但如果我运行mvn spring boot:run,则会打印日志语句。谢谢
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.0.RELEASE)
Process finished with exit code 1