我可以构建应用程序而不会出现任何错误。当我尝试运行应用程序时
显示受到打击的命令行日志
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.7.RELEASE)
01:35:57.865 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
01:35:57.929 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 48ms. Found 0 repository interfaces.
configFilePath=C:/Users/Administrator/Desktop/Springboot/config/Configuration.xml
log4j:WARN No appenders could be found for logger (XFabFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
01:36:00.425 [main] INFO o.s.orm.jpa.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'SybaseUnit'
62 SybaseUnit INFO [main] openjpa.Enhance - You have enabled runtime enhancement, but have not specified the set of persistent classes. OpenJPA must look for metadata for every loaded class, whic
h might increase class load times significantly.
47 SybaseUnit WARN [main] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'SybaseUnit', root URL [jar:file:/D:/Service/target/Service-1.0.jar!/BOOT-INF/classes!/]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class tra
nsformation will not be available.
01:36:01.399 [main] INFO o.s.orm.jpa.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'MssqlUnit'
0 MssqlUnit INFO [main] openjpa.Enhance - You have enabled runtime enhancement, but have not specified the set of persistent classes. OpenJPA must look for metadata for every loaded class, which
might increase class load times significantly.
0 MssqlUnit WARN [main] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'MssqlUnit', root URL [jar:file:/D:/Service/target/Service-1.0.jar!/BOOT-INF/classes!/]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transf
ormation will not be available.
01:36:02.098 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'xeTaskExecutor'
1229 SybaseUnit INFO [main] openjpa.Runtime - Starting OpenJPA 2.4.0
2479 SybaseUnit INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.SybaseDictionary" (Adaptive Server Enterprise Adaptive Server Enterprise/15.7/EBF 22779 SMP SP12
2 /P/x86_64/Enterprise Linux/ase157sp12x/3662/64-bit/FBO/Sat Apr 19 05:48:19 2014 ,jConnect (TM) for JDBC (TM) jConnect (TM) for JDBC(TM)/6.0(Build 25308)/P/EBF11817/JDK14/Fri Feb 27 20:57:29 2004).
2643 SybaseUnit INFO [main] openjpa.jdbc.JDBC - Connected to Adaptive Server Enterprise version 0.0 using JDBC driver jConnect (TM) for JDBC (TM) version jConnect (TM) for JDBC(TM)/6.0(Build 25308
)/P/EBF11817/JDK14/Fri Feb 27 20:57:29 2004.
01:36:05.385 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService
01:36:05.452 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'asyncExecutor'
日志文件日志如下
2019-11-04 01:35:45,021 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [Thread-4] Shutting down ExecutorService 'xeTaskExecutor'
2019-11-04 01:35:45,037 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [Thread-4] Shutting down ExecutorService 'asyncExecutor'
2019-11-04 01:35:45,037 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [Thread-4] Shutting down ExecutorService 'xeTaskExecutor'
2019-11-04 01:35:45,056 INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean [Thread-4] Closing JPA EntityManagerFactory for persistence unit 'MssqlUnit'
2019-11-04 01:35:45,058 INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean [Thread-4] Closing JPA EntityManagerFactory for persistence unit 'SybaseUnit'
2019-11-04 01:35:54,857 INFO com.ge.hcit.xer.app.services.api.ServiceMain [main] Starting ServiceMain v7.0.0.0 on host-4 with PID 5932
(D:\Service\target\Service-1.0.jar started by Administrator in D:\Service\target)
2019-11-04 01:35:54,860 DEBUG com.ge.hcit.xer.app.services.api.ServiceMain [main] Running with Spring Boot v2.1.7.RELEASE, Spring v5.1.9.RELEASE
2019-11-04 01:35:54,860 INFO com.ge.hcit.xer.app.services.api.ServiceMain [main] The following profiles are active: Service
2019-11-04 01:35:57,865 INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate [main] Bootstrapping Spring Data repositories in DEFAULT mode.
2019-11-04 01:35:57,929 INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate [main] Finished Spring Data repository scanning in 48ms. Found 0 repository interfaces.
2019-11-04 01:36:00,425 INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean [main] Building JPA container EntityManagerFactory for persistence unit 'SybaseUnit'
2019-11-04 01:36:01,399 INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean [main] Building JPA container EntityManagerFactory for persistence unit 'MssqlUnit'
2019-11-04 01:36:02,098 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [main] Initializing ExecutorService 'xeTaskExecutor'
2019-11-04 01:36:05,385 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [main] Initializing ExecutorService
2019-11-04 01:36:05,452 INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor [main] Initializing ExecutorService 'asyncExecutor'
2019-11-04 01:36:06,692 INFO com.app.services.api.ServiceMain [main] Started ServiceMain in 13.78 seconds (JVM running for 15.34)
主班
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class,org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration.class })
@ComponentScan(basePackages = { "com.data.*" })
@Profile(ProfileNames.SERVICE)
@ImportResource(value = { "file:/${external.config}" + "/spring/service-config.xml","file:/${external.config}" + "spring/datasource-config.xml" })
public class ServiceMain {
public static void main(String[] args) {
ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(ServiceMain.class).build()
.run(args);
}
}
它显示主类已经开始,没有显示下面的
2019-11-04 02:35:53.552 INFO 5700 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
pom.xml我添加了spring-boot-starter-web仍然保持不变。 无法找到这种行为的原因。 请提出解决方案。
编辑1
我已启用tomcat日志。现在它显示以下内容
02:44:30.042 [background-preinit] DEBUG org.apache.tomcat.util.digester.Digester - No rules found matching [mbeans-descriptors]
02:44:30.042 [background-preinit] DEBUG org.apache.tomcat.util.digester.Digester.sax - endDocument()
02:44:30.057 [background-preinit] DEBUG org.apache.tomcat.util.modeler.Registry - Using existing MBeanServer 0
Application.properties
logging.level.org.springframework.web=INFO
logging.level.org.springframework=info
logging.level.root=error
logging.level.org.hibernate=error
logging.level.org.apache.tomcat=DEBUG
logging.level.org.apache.catalina=DEBUG
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
spring.main.allow-bean-definition-overriding=true
spring.profiles.active=Service
server.port=8086
server.error.whitelabel.enabled=false
server.servlet.context-path=/Service
server.tomcat.accesslog.enabled=true
spring.datasource.initialize=false
spring.main.web-application-type=none