我有一个spring boot 1.5.2.RELEASE项目,它非常简单,只有一些Rest服务。 当我添加spring-boot-starter-data-jpa时 - 突然间服务器不会保持活动状态 我已经添加了这些日志作为示例(注意 - 我已经注释掉了数据源的配置,这仍然发生 - tomcat在启动后关闭)加入JPA后Spring Boot关闭
2017-04-01 12:10:25 <> DEBUG logging:19 - Logging Provider: org.jboss.logging.Log4jLoggerProvider
2017-04-01 12:10:25 <> INFO Version:30 - HV000001: Hibernate Validator 5.3.4.Final
2017-04-01 12:10:25 <> DEBUG DefaultTraversableResolver:103 - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-04-01 12:10:25 <> DEBUG DefaultTraversableResolver:114 - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:103 - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:114 - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:103 - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:114 - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:163 - Setting custom MessageInterpolator of type org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:185 - Setting custom ConstraintValidatorFactory of type org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:199 - Setting custom ParameterNameProvider of type com.sun.proxy.$Proxy44
2017-04-01 12:10:26 <> DEBUG ValidationXmlParser:91 - Trying to load META-INF/validation.xml for XML based Validator configuration.
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:47 - Trying to load META-INF/validation.xml via user class loader
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:54 - Trying to load META-INF/validation.xml via TCCL
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:60 - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
2017-04-01 12:10:26 <> DEBUG ValidationXmlParser:98 - No META-INF/validation.xml found. Using annotation based configuration only.
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:103 - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:114 - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:103 - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver
2017-04-01 12:10:26 <> DEBUG DefaultTraversableResolver:114 - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:163 - Setting custom MessageInterpolator of type org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:185 - Setting custom ConstraintValidatorFactory of type org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory
2017-04-01 12:10:26 <> DEBUG ConfigurationImpl:199 - Setting custom ParameterNameProvider of type com.sun.proxy.$Proxy44
2017-04-01 12:10:26 <> DEBUG ValidationXmlParser:91 - Trying to load META-INF/validation.xml for XML based Validator configuration.
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:47 - Trying to load META-INF/validation.xml via user class loader
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:54 - Trying to load META-INF/validation.xml via TCCL
2017-04-01 12:10:26 <> DEBUG ResourceLoaderHelper:60 - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
2017-04-01 12:10:26 <> DEBUG ValidationXmlParser:98 - No META-INF/validation.xml found. Using annotation based configuration only.
Apr 01, 2017 12:10:27 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Apr 01, 2017 12:10:27 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.11
Apr 01, 2017 12:10:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring embedded WebApplicationContext
Apr 01, 2017 12:10:27 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
任何人都可以提供任何见解我如何能够阻止此行为? 全loggign输出可以在这里找到 - https://pastebin.com/3yqkex6i 感谢 达明
你可以添加更多日志记录吗?我认为你需要为你的pom添加一个数据库客户端,并使用缺省值运行数据库(如果你想拥有最少的配置)。 –
我已经添加了mysql连接器并将相关配置添加到了我的application.properties – Damien
您可以提供更多日志记录吗? –