Issue
I want to turn off the debug output on the console for my spring boot application.
I expected to have a default INFO logging. But that is not the case.
I tried to turn the levels off brute force with
https://mkyong.com/spring-boot/spring-boot-log4j-2-example/
I dont like this a currently it does not even work.
In how turn off debug log messages in spring boot this is marked as a solution. I dont think it is.
I reduced my project to the minimum and get this Error for multiple kind of setups.
Initially i tried to use Spring Boot 2.2.1.RELEASE with Jupiter and Log4J2. With Log4J i was able to reduce the logging but i had to set each Logger individually. The hierarchy did not seem to work.
Here I present Spring Boot 2.1.1.RELEASE with Junit4 and default logging (should be logback).
pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<spring-boot.version>2.1.1.RELEASE</spring-boot.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>spring-boot-maven-plugin</artifactId>
<groupId>org.springframework.boot</groupId>
<version>${spring-boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
my code
TestClazz.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
#RunWith(SpringRunner.class)
#SpringBootTest
public class TestClazz {
#Test
public void testSomething() {
System.out.println("hi");
}
}
TestSpringBootApplication.java
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class TestSpringBootApplication {
}
my configuration
application.properties
logging.level.org.springframework=OFF
logging.level.root=OFF
logback-test.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="org.springframework" level="OFF"/>
</configuration>
project structure
console output
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.fee:fdsg:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 30, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------------------< com.fee:fdsg >----------------------------
[INFO] Building fdsg 0.0.1-SNAPSHOT
.....
[INFO] Compiling 2 source files to [[CENSORED]]]\fdsg\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # fdsg ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running any.TestClazz
2020-04-06 22:18:07.802 DEBUG 14616 --- [ main] .c.l.ClasspathLoggingApplicationListener : Application started with classpath: [file:/C:/winapp/cygwin304/tmp/surefire101039361747353203/surefirebooter234714427829446725.jar]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.1.RELEASE)
2020-04-06 22:18:07.863 DEBUG 14616 --- [ main] o.s.boot.SpringApplication : Loading source class any.TestSpringBootApplication
2020-04-06 22:18:07.877 DEBUG 14616 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Loaded config file '[[CENSORED]]]/fdsg/target/classes/application.properties' (classpath:/application.properties)
2020-04-06 22:18:08.241 DEBUG 14616 --- [ main] ConditionEvaluationReportLoggingListener :
============================
CONDITIONS EVALUATION REPORT
============================
Positive matches:
-----------------
GenericCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration automatic cache type (CacheCondition)
NoOpCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration automatic cache type (CacheCondition)
PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer matched:
- #ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) did not find any beans (OnBeanCondition)
SimpleCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration automatic cache type (CacheCondition)
TaskExecutionAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor' (OnClassCondition)
TaskExecutionAutoConfiguration#applicationTaskExecutor matched:
- #ConditionalOnMissingBean (types: java.util.concurrent.Executor; SearchStrategy: all) did not find any beans (OnBeanCondition)
TaskExecutionAutoConfiguration#taskExecutorBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.task.TaskExecutorBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
TaskSchedulingAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler' (OnClassCondition)
TaskSchedulingAutoConfiguration#taskSchedulerBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.task.TaskSchedulerBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
Negative matches:
-----------------
ActiveMQAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.jms.ConnectionFactory' (OnClassCondition)
AopAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.aspectj.lang.annotation.Aspect' (OnClassCondition)
ArtemisAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.jms.ConnectionFactory' (OnClassCondition)
BatchAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.batch.core.launch.JobLauncher' (OnClassCondition)
CacheAutoConfiguration:
Did not match:
- #ConditionalOnBean (types: org.springframework.cache.interceptor.CacheAspectSupport; SearchStrategy: all) did not find any beans of type org.springframework.cache.interceptor.CacheAspectSupport (OnBeanCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.cache.CacheManager' (OnClassCondition)
CacheAutoConfiguration.CacheManagerJpaDependencyConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean' (OnClassCondition)
- Ancestor org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration did not match (ConditionEvaluationReport.AncestorsMatchedCondition)
CaffeineCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.github.benmanes.caffeine.cache.Caffeine', 'org.springframework.cache.caffeine.CaffeineCacheManager' (OnClassCondition)
CassandraAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.datastax.driver.core.Cluster' (OnClassCondition)
CassandraDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.datastax.driver.core.Cluster' (OnClassCondition)
CassandraReactiveDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.datastax.driver.core.Cluster' (OnClassCondition)
CassandraReactiveRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.cassandra.ReactiveSession' (OnClassCondition)
CassandraRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.datastax.driver.core.Session' (OnClassCondition)
ClientHttpConnectorAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.reactive.function.client.WebClient' (OnClassCondition)
....
HazelcastCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.hazelcast.core.HazelcastInstance', 'com.hazelcast.spring.cache.HazelcastCacheManager' (OnClassCondition)
HazelcastJpaDependencyAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.hazelcast.core.HazelcastInstance' (OnClassCondition)
HibernateJpaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.persistence.EntityManager' (OnClassCondition)
HttpEncodingAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.filter.CharacterEncodingFilter' (OnClassCondition)
HttpHandlerAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.http.server.reactive.HttpHandler' (OnClassCondition)
HttpMessageConvertersAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.http.converter.HttpMessageConverter' (OnClassCondition)
HypermediaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.hateoas.Resource' (OnClassCondition)
InfinispanCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.infinispan.spring.provider.SpringEmbeddedCacheManager' (OnClassCondition)
InfluxDbAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.influxdb.InfluxDB' (OnClassCondition)
IntegrationAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.integration.config.EnableIntegration' (OnClassCondition)
JCacheCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.cache.Caching', 'org.springframework.cache.jcache.JCacheCacheManager' (OnClassCondition)
JacksonAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.fasterxml.jackson.databind.ObjectMapper' (OnClassCondition)
JdbcRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.jdbc.repository.config.JdbcConfiguration' (OnClassCondition)
JdbcTemplateAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)
JerseyAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.ServletRegistration' (OnClassCondition)
JestAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'io.searchbox.client.JestClient' (OnClassCondition)
JmsAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.jms.Message' (OnClassCondition)
JmxAutoConfiguration:
Did not match:
- #ConditionalOnProperty (spring.jmx.enabled=true) found different value in property 'enabled' (OnPropertyCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.jmx.export.MBeanExporter' (OnClassCondition)
JndiConnectionFactoryAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jms.core.JmsTemplate' (OnClassCondition)
JndiDataSourceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
JooqAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.jooq.DSLContext' (OnClassCondition)
JpaRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.jpa.repository.JpaRepository' (OnClassCondition)
JsonbAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.json.bind.Jsonb' (OnClassCondition)
JtaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.transaction.Transaction' (OnClassCondition)
KafkaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.kafka.core.KafkaTemplate' (OnClassCondition)
LdapAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.ldap.core.ContextSource' (OnClassCondition)
LdapRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.ldap.repository.LdapRepository' (OnClassCondition)
LiquibaseAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'liquibase.change.DatabaseChange' (OnClassCondition)
MailSenderAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.mail.internet.MimeMessage' (OnClassCondition)
MailSenderValidatorAutoConfiguration:
Did not match:
- #ConditionalOnSingleCandidate did not find required type 'org.springframework.mail.javamail.JavaMailSenderImpl' (OnBeanCondition)
MessageSourceAutoConfiguration:
Did not match:
- ResourceBundle did not find bundle with basename messages (MessageSourceAutoConfiguration.ResourceBundleCondition)
MongoAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.MongoClient' (OnClassCondition)
MongoDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.client.MongoClient' (OnClassCondition)
MongoReactiveAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)
MongoReactiveDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)
MongoReactiveRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.reactivestreams.client.MongoClient' (OnClassCondition)
MongoRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.MongoClient' (OnClassCondition)
MultipartAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.MultipartConfigElement' (OnClassCondition)
MustacheAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.samskivert.mustache.Mustache' (OnClassCondition)
Neo4jDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.neo4j.ogm.session.SessionFactory' (OnClassCondition)
Neo4jRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.neo4j.ogm.session.Neo4jSession' (OnClassCondition)
OAuth2ClientAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.config.annotation.web.configuration.EnableWebSecurity' (OnClassCondition)
OAuth2ResourceServerAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken' (OnClassCondition)
PersistenceExceptionTranslationAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor' (OnClassCondition)
ProjectInfoAutoConfiguration#buildProperties:
Did not match:
- #ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}' (OnResourceCondition)
ProjectInfoAutoConfiguration#gitProperties:
Did not match:
- GitResource did not find git info at classpath:git.properties (ProjectInfoAutoConfiguration.GitResourceAvailableCondition)
QuartzAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.quartz.Scheduler' (OnClassCondition)
RabbitAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.rabbitmq.client.Channel' (OnClassCondition)
ReactiveOAuth2ClientAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)
ReactiveOAuth2ResourceServerAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity' (OnClassCondition)
ReactiveSecurityAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)
ReactiveUserDetailsServiceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.authentication.ReactiveAuthenticationManager' (OnClassCondition)
ReactiveWebServerFactoryAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.http.ReactiveHttpInputMessage' (OnClassCondition)
ReactorCoreAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)
RedisAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.redis.core.RedisOperations' (OnClassCondition)
RedisCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.redis.connection.RedisConnectionFactory' (OnClassCondition)
RedisReactiveAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'reactor.core.publisher.Flux' (OnClassCondition)
RedisRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.redis.repository.configuration.EnableRedisRepositories' (OnClassCondition)
RepositoryRestMvcAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration' (OnClassCondition)
RestClientAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.elasticsearch.client.RestClient' (OnClassCondition)
RestTemplateAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.client.RestTemplate' (OnClassCondition)
SecurityAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.authentication.DefaultAuthenticationEventPublisher' (OnClassCondition)
SecurityFilterAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.config.http.SessionCreationPolicy' (OnClassCondition)
SecurityRequestMatcherProviderAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.web.util.matcher.RequestMatcher' (OnClassCondition)
SendGridAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.sendgrid.SendGrid' (OnClassCondition)
ServletWebServerFactoryAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.ServletRequest' (OnClassCondition)
SessionAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.session.Session' (OnClassCondition)
SolrAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.solr.client.solrj.impl.CloudSolrClient' (OnClassCondition)
SolrRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.solr.client.solrj.SolrClient' (OnClassCondition)
SpringApplicationAdminJmxAutoConfiguration:
Did not match:
- #ConditionalOnProperty (spring.application.admin.enabled=true) did not find property 'enabled' (OnPropertyCondition)
SpringDataWebAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.web.PageableHandlerMethodArgumentResolver' (OnClassCondition)
TaskSchedulingAutoConfiguration#taskScheduler:
Did not match:
- #ConditionalOnBean (names: org.springframework.context.annotation.internalScheduledAnnotationProcessor; SearchStrategy: all) did not find any beans named org.springframework.context.annotation.internalScheduledAnnotationProcessor (OnBeanCondition)
ThymeleafAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.thymeleaf.templatemode.TemplateMode' (OnClassCondition)
TransactionAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.transaction.PlatformTransactionManager' (OnClassCondition)
UserDetailsServiceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.authentication.AuthenticationManager' (OnClassCondition)
ValidationAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.validation.executable.ExecutableValidator' (OnClassCondition)
WebClientAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.reactive.function.client.WebClient' (OnClassCondition)
WebFluxAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.reactive.config.WebFluxConfigurer' (OnClassCondition)
WebMvcAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)
WebServiceTemplateAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.oxm.Marshaller' (OnClassCondition)
WebServicesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.ws.transport.http.MessageDispatcherServlet' (OnClassCondition)
WebSocketMessagingAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer' (OnClassCondition)
WebSocketReactiveAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)
WebSocketServletAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.servlet.Servlet' (OnClassCondition)
XADataSourceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' (OnClassCondition)
Exclusions:
-----------
None
Unconditional classes:
----------------------
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
hi
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.214 s - in any.TestClazz
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
.......
To enable logs till INFO and not log messages with levels DEBUG and TRACE this should suffice:
logging.level.root=INFO
the logging.level.* should have one of the following values: ERROR, WARN, INFO, DEBUG, or TRACE. You can refer to the documentation here.
If you specify a particular level, all levels are enabled starting from ERROR till that level. For instance, setting logging.level.root=INFO will log ERROR, WARN, and INFO messages.
Related
I have a springboot application using spring security and keycloak. when executing the application, securing with jwt tokens works as expected.
then i have a seperate test application.yml where i try to disable keycloak, as found in tutorials in the web.
for webmvc tests, this does not work as expected. although i try to disable everything security and keycloak related, still KeycloakWebSecurityConfigurerAdapter tries to use the KeycloakConfigResolver class, not finding it.
it then falls back to load the keycloak.json file and fails.
what do i have to make MockMvc tests work? i just want to have every request permitted as implemented in the configure HttpSecurity method. keycloak basically shouldnt be used for mockmvc tests.
pom:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.4-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
[...]
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-starter</artifactId>
<version>19.0.2</version>
</dependency>
Config:
keycloak:
enabled: false
realm: mock
resource: mock
auth-server-url: http://mock
bearer-only: true
credentials:
secret: mock
spring:
autoconfigure:
exclude: org.keycloak.adapters.springboot.KeycloakAutoConfiguration
Keycloak Bean Configuration:
#Configuration
#EnableWebSecurity
#ConditionalOnProperty(name = ["keycloak.enabled"], havingValue = "false", matchIfMissing = false)
class KeycloakDisabledConfig: KeycloakWebSecurityConfigurerAdapter(){
override fun configure(http: HttpSecurity) {
http.csrf()
.disable()
.authorizeRequests()
.anyRequest()
.permitAll()
}
override fun configure(web: WebSecurity) {
web.ignoring().antMatchers("/**")
}
override fun sessionAuthenticationStrategy(): SessionAuthenticationStrategy = RegisterSessionAuthenticationStrategy(
SessionRegistryImpl()
)
Test:
#WebMvcTest(value = [OrganizationController::class], excludeAutoConfiguration = [SecurityAutoConfiguration::class])
#AutoConfigureMockMvc(addFilters = false)
#Import(value = [
OrganizationMapper::class
])
internal class OrganizationControllerTest{
#Autowired
lateinit var mockmvc: MockMvc
loaded context:
Positive matches:
-----------------
ErrorMvcAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.servlet.Servlet', 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
ErrorMvcAutoConfiguration#basicErrorController matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.web.servlet.error.ErrorController; SearchStrategy: current) did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration#errorAttributes matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.web.servlet.error.ErrorAttributes; SearchStrategy: current) did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration matched:
- #ConditionalOnProperty (server.error.whitelabel.enabled) matched (OnPropertyCondition)
- ErrorTemplate Missing did not find error template view (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#beanNameViewResolver matched:
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.view.BeanNameViewResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#defaultErrorView matched:
- #ConditionalOnMissingBean (names: error; SearchStrategy: all) did not find any beans (OnBeanCondition)
GsonAutoConfiguration matched:
- #ConditionalOnClass found required class 'com.google.gson.Gson' (OnClassCondition)
GsonAutoConfiguration#gson matched:
- #ConditionalOnMissingBean (types: com.google.gson.Gson; SearchStrategy: all) did not find any beans (OnBeanCondition)
GsonAutoConfiguration#gsonBuilder matched:
- #ConditionalOnMissingBean (types: com.google.gson.GsonBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
GsonHttpMessageConvertersConfiguration matched:
- #ConditionalOnClass found required class 'com.google.gson.Gson' (OnClassCondition)
HttpEncodingAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.web.filter.CharacterEncodingFilter' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
- #ConditionalOnProperty (server.servlet.encoding.enabled) matched (OnPropertyCondition)
HttpEncodingAutoConfiguration#characterEncodingFilter matched:
- #ConditionalOnMissingBean (types: org.springframework.web.filter.CharacterEncodingFilter; SearchStrategy: all) did not find any beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.HttpMessageConverter' (OnClassCondition)
- NoneNestedConditions 0 matched 1 did not; NestedCondition on HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition.ReactiveWebApplication did not find reactive web application classes (HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition)
HttpMessageConvertersAutoConfiguration#messageConverters matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.http.HttpMessageConverters; SearchStrategy: all) did not find any beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration.StringHttpMessageConverterConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.StringHttpMessageConverter' (OnClassCondition)
HttpMessageConvertersAutoConfiguration.StringHttpMessageConverterConfiguration#stringHttpMessageConverter matched:
- #ConditionalOnMissingBean (types: org.springframework.http.converter.StringHttpMessageConverter; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonAutoConfiguration matched:
- #ConditionalOnClass found required class 'com.fasterxml.jackson.databind.ObjectMapper' (OnClassCondition)
JacksonAutoConfiguration.Jackson2ObjectMapperBuilderCustomizerConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration#jacksonObjectMapperBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonAutoConfiguration.JacksonObjectMapperConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperConfiguration#jacksonObjectMapper matched:
- #ConditionalOnMissingBean (types: com.fasterxml.jackson.databind.ObjectMapper; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration matched:
- #ConditionalOnClass found required class 'com.fasterxml.jackson.module.paramnames.ParameterNamesModule' (OnClassCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration#parameterNamesModule matched:
- #ConditionalOnMissingBean (types: com.fasterxml.jackson.module.paramnames.ParameterNamesModule; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonHttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration matched:
- #ConditionalOnClass found required class 'com.fasterxml.jackson.databind.ObjectMapper' (OnClassCondition)
- #ConditionalOnProperty (spring.mvc.converters.preferred-json-mapper=jackson) matched (OnPropertyCondition)
- #ConditionalOnBean (types: com.fasterxml.jackson.databind.ObjectMapper; SearchStrategy: all) found bean 'jacksonObjectMapper' (OnBeanCondition)
JacksonHttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration#mappingJackson2HttpMessageConverter matched:
- #ConditionalOnMissingBean (types: org.springframework.http.converter.json.MappingJackson2HttpMessageConverter ignored: org.springframework.hateoas.server.mvc.TypeConstrainedMappingJackson2HttpMessageConverter,org.springframework.data.rest.webmvc.alps.AlpsJsonHttpMessageConverter; SearchStrategy: all) did not find any beans (OnBeanCondition)
KeycloakDisabledConfig matched:
- #ConditionalOnProperty (keycloak.enabled=false) matched (OnPropertyCondition)
MockMvcAutoConfiguration matched:
- found 'session' scope (OnWebApplicationCondition)
MockMvcAutoConfiguration#dispatcherServlet matched:
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) did not find any beans (OnBeanCondition)
MockMvcAutoConfiguration#dispatcherServletPath matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath; SearchStrategy: all) did not find any beans (OnBeanCondition)
MockMvcAutoConfiguration#mockMvc matched:
- #ConditionalOnMissingBean (types: org.springframework.test.web.servlet.MockMvc; SearchStrategy: all) did not find any beans (OnBeanCondition)
MockMvcAutoConfiguration#mockMvcBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.test.web.servlet.MockMvcBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
NoOpCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration NONE cache type (CacheCondition)
SecurityFilterAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer', 'org.springframework.security.config.http.SessionCreationPolicy' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
SecurityFilterAutoConfiguration#securityFilterChainRegistration matched:
- #ConditionalOnBean (names: springSecurityFilterChain; SearchStrategy: all) found bean 'springSecurityFilterChain' (OnBeanCondition)
SpringDataWebAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.data.web.PageableHandlerMethodArgumentResolver', 'org.springframework.web.servlet.config.annotation.WebMvcConfigurer' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
- #ConditionalOnMissingBean (types: org.springframework.data.web.PageableHandlerMethodArgumentResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
SpringDataWebAutoConfiguration#pageableCustomizer matched:
- #ConditionalOnMissingBean (types: org.springframework.data.web.config.PageableHandlerMethodArgumentResolverCustomizer; SearchStrategy: all) did not find any beans (OnBeanCondition)
SpringDataWebAutoConfiguration#sortCustomizer matched:
- #ConditionalOnMissingBean (types: org.springframework.data.web.config.SortHandlerMethodArgumentResolverCustomizer; SearchStrategy: all) did not find any beans (OnBeanCondition)
TaskExecutionAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor' (OnClassCondition)
TaskExecutionAutoConfiguration#applicationTaskExecutor matched:
- #ConditionalOnMissingBean (types: java.util.concurrent.Executor; SearchStrategy: all) did not find any beans (OnBeanCondition)
TaskExecutionAutoConfiguration#taskExecutorBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.task.TaskExecutorBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
UserDetailsServiceAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.security.authentication.AuthenticationManager' (OnClassCondition)
- #ConditionalOnBean (types: org.springframework.security.config.annotation.ObjectPostProcessor; SearchStrategy: all) found bean 'objectPostProcessor'; #ConditionalOnMissingBean (types: org.springframework.security.authentication.AuthenticationManager,org.springframework.security.authentication.AuthenticationProvider,org.springframework.security.core.userdetails.UserDetailsService,org.springframework.security.authentication.AuthenticationManagerResolver,org.springframework.security.oauth2.jwt.JwtDecoder,org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector,org.springframework.security.oauth2.client.registration.ClientRegistrationRepository,org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository; SearchStrategy: all) did not find any beans (OnBeanCondition)
ValidationAutoConfiguration matched:
- #ConditionalOnClass found required class 'javax.validation.executable.ExecutableValidator' (OnClassCondition)
- #ConditionalOnResource found location classpath:META-INF/services/javax.validation.spi.ValidationProvider (OnResourceCondition)
ValidationAutoConfiguration#defaultValidator matched:
- #ConditionalOnMissingBean (types: javax.validation.Validator; SearchStrategy: all) did not find any beans (OnBeanCondition)
ValidationAutoConfiguration#methodValidationPostProcessor matched:
- #ConditionalOnMissingBean (types: org.springframework.validation.beanvalidation.MethodValidationPostProcessor; SearchStrategy: current) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.servlet.Servlet', 'org.springframework.web.servlet.DispatcherServlet', 'org.springframework.web.servlet.config.annotation.WebMvcConfigurer' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration#formContentFilter matched:
- #ConditionalOnProperty (spring.mvc.formcontent.filter.enabled) matched (OnPropertyCondition)
- #ConditionalOnMissingBean (types: org.springframework.web.filter.FormContentFilter; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.EnableWebMvcConfiguration#flashMapManager matched:
- #ConditionalOnMissingBean (names: flashMapManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.EnableWebMvcConfiguration#localeResolver matched:
- #ConditionalOnMissingBean (names: localeResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.EnableWebMvcConfiguration#themeResolver matched:
- #ConditionalOnMissingBean (names: themeResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#defaultViewResolver matched:
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.view.InternalResourceViewResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#requestContextFilter matched:
- #ConditionalOnMissingBean (types: org.springframework.web.context.request.RequestContextListener,org.springframework.web.filter.RequestContextFilter; SearchStrategy: all) did not find any beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#viewResolver matched:
- #ConditionalOnBean (types: org.springframework.web.servlet.ViewResolver; SearchStrategy: all) found beans 'defaultViewResolver', 'beanNameViewResolver', 'mvcViewResolver'; #ConditionalOnMissingBean (names: viewResolver types: org.springframework.web.servlet.view.ContentNegotiatingViewResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
Stacktrace:
Caused by: java.io.FileNotFoundException: Unable to locate Keycloak configuration file: keycloak.json
at org.keycloak.adapters.springsecurity.AdapterDeploymentContextFactoryBean.loadKeycloakDeployment(AdapterDeploymentContextFactoryBean.java:83) ~[keycloak-spring-security-adapter-19.0.1.jar:19.0.1]
at org.keycloak.adapters.springsecurity.AdapterDeploymentContextFactoryBean.afterPropertiesSet(AdapterDeploymentContextFactoryBean.java:76) ~[keycloak-spring-security-adapter-19.0.1.jar:19.0.1]
at org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter.adapterDeploymentContext(KeycloakWebSecurityConfigurerAdapter.java:72) ~[keycloak-spring-security-adapter-19.0.1.jar:19.0.1]
at com.jschausberger.demo.keycloak.KeycloakDisabledConfig$$EnhancerBySpringCGLIB$$ef3c2204.CGLIB$adapterDeploymentContext$13(<generated>) ~[classes/:na]
at com.jschausberger.demo.keycloak.KeycloakDisabledConfig$$EnhancerBySpringCGLIB$$ef3c2204$$FastClassBySpringCGLIB$$3c55188.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.23.jar:5.3.23]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.23.jar:5.3.23]
at com.jschausberger.demo.keycloak.KeycloakDisabledConfig$$EnhancerBySpringCGLIB$$ef3c2204.adapterDeploymentContext(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.23.jar:5.3.23]
... 91 common frames omitted
First, do not use Keycloak adapter for Spring (keycloak-spring-boot-starter). It is very deprecated and not compatible with spring-boot 3 (RC1 this week, release in November). Use spring-boot-starter-oauth2-resource-server instead. Article here, more tutorials there.
Second, do not disable security in your unit-test. Use mocked authentication and use it to unit-test your security rules. You might refer to article and tutorials linked above to figure out how.
I have a desktop application written with Spring Boot 2.7.3 (without the web server) and UI part with JavaFX. Everything is working pretty solid. But the startup time of the application is beyond 5s. And sometimes it takes more than 10s. And this is not because of the hardware as the desktop have decent specs.
To provide good user experience, I need this startup time below 1s or may be 2s
Things I have tried
Lazy initialized beans and repositories
Excluded some autoconfiguration classes to the best of my knownledge
Please suggest me ways to optimize this thing.
Startup Logs
[INFO ] [10-09-2022 17:19:11,805 [background-preinit] Version:org.hibernate.validator.internal.util.Version.<clinit>(Version.java:21)]:HV000001: Hibernate Validator 6.2.4.Final
[INFO ] [10-09-2022 17:19:11,941 [DefaultDispatcher-worker-2] SpringApplication:org.springframework.boot.StartupInfoLogger.logStarting(StartupInfoLogger.java:55)]:Starting application using Java 17.0.2 on Yash-Garg with PID 3728 (started by Yash Garg in C:\Users\Yash\Documents\app)
[INFO ] [10-09-2022 17:19:11,943 [DefaultDispatcher-worker-2] SpringApplication:org.springframework.boot.SpringApplication.logStartupProfileInfo(SpringApplication.java:640)]:The following 1 profile is active: "default"
[INFO ] [10-09-2022 17:19:12,987 [DefaultDispatcher-worker-2] RepositoryConfigurationDelegate:org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:132)]:Bootstrapping Spring Data JPA repositories in LAZY mode.
[INFO ] [10-09-2022 17:19:13,185 [DefaultDispatcher-worker-2] RepositoryConfigurationDelegate:org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:201)]:Finished Spring Data repository scanning in 183 ms. Found 29 JPA repository interfaces.
[INFO ] [10-09-2022 17:19:14,386 [DefaultDispatcher-worker-2] VersionPrinter:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:Flyway Community Edition 8.5.13 by Redgate
[INFO ] [10-09-2022 17:19:14,386 [DefaultDispatcher-worker-2] VersionPrinter:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#8.5.13
[INFO ] [10-09-2022 17:19:14,387 [DefaultDispatcher-worker-2] VersionPrinter:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:
[INFO ] [10-09-2022 17:19:14,607 [DefaultDispatcher-worker-2] BaseDatabaseType:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:Database: jdbc:sqlite:C:\Path\To\Database\File (SQLite 3.39)
[INFO ] [10-09-2022 17:19:14,657 [DefaultDispatcher-worker-2] DbValidate:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:Successfully validated 4 migrations (execution time 00:00.030s)
[INFO ] [10-09-2022 17:19:14,664 [DefaultDispatcher-worker-2] DbMigrate:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:Current version of schema "main": 1.4
[INFO ] [10-09-2022 17:19:14,664 [DefaultDispatcher-worker-2] DbMigrate:org.flywaydb.core.internal.logging.slf4j.Slf4jLog.info(Slf4jLog.java:37)]:Schema "main" is up to date. No migration necessary.
[DEBUG] [10-09-2022 17:19:14,720 [DefaultDispatcher-worker-2] AutoConfigurationPackages:org.springframework.boot.autoconfigure.AutoConfigurationPackages$BasePackages.get(AutoConfigurationPackages.java:196)]:#EnableAutoConfiguration was declared on a class in the package 'in.app'. Automatic #Repository and #Entity scanning is enabled.
[INFO ] [10-09-2022 17:19:14,897 [DefaultDispatcher-worker-2] Version:org.hibernate.Version.logVersion(Version.java:44)]:HHH000412: Hibernate ORM core version 5.6.10.Final
[INFO ] [10-09-2022 17:19:15,105 [DefaultDispatcher-worker-2] Version:org.hibernate.annotations.common.reflection.java.JavaReflectionManager.<clinit>(JavaReflectionManager.java:56)]:HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
[INFO ] [10-09-2022 17:19:15,193 [DefaultDispatcher-worker-2] Dialect:org.hibernate.dialect.Dialect.<init>(Dialect.java:175)]:HHH000400: Using dialect: org.sqlite.hibernate.dialect.SQLiteDialect
[INFO ] [10-09-2022 17:19:15,236 [DefaultDispatcher-worker-2] Dialect:org.hibernate.dialect.Dialect.<init>(Dialect.java:175)]:HHH000400: Using dialect: org.sqlite.hibernate.dialect.SQLiteDialect
[INFO ] [10-09-2022 17:19:15,812 [DefaultDispatcher-worker-2] EhcacheManager:org.ehcache.core.EhcacheManager.createCache(EhcacheManager.java:305)]:Cache 'in.app.entity.TaxCodeEntity' created in EhcacheManager.
[INFO ] [10-09-2022 17:19:15,826 [DefaultDispatcher-worker-2] EhcacheManager:org.ehcache.core.EhcacheManager.createCache(EhcacheManager.java:305)]:Cache 'in.app.entity.TransactionTypeEntity' created in EhcacheManager.
[INFO ] [10-09-2022 17:19:16,469 [DefaultDispatcher-worker-2] LocalContainerEntityManagerFactoryBean:org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:437)]:Initialized JPA EntityManagerFactory for persistence unit 'default'
CONDITIONS EVALUATION REPORT
Positive matches:
DataSourceAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.sql.DataSource', 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
- #ConditionalOnMissingBean (types: io.r2dbc.spi.ConnectionFactory; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourceAutoConfiguration.PooledDataSourceConfiguration matched:
- AnyNestedCondition 1 matched 1 did not; NestedCondition on DataSourceAutoConfiguration.PooledDataSourceCondition.PooledDataSourceAvailable PooledDataSource found supported DataSource; NestedCondition on DataSourceAutoConfiguration.PooledDataSourceCondition.ExplicitType #ConditionalOnProperty (spring.datasource.type) did not find property 'type' (DataSourceAutoConfiguration.PooledDataSourceCondition)
- #ConditionalOnMissingBean (types: javax.sql.DataSource,javax.sql.XADataSource; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourceConfiguration.Hikari matched:
- #ConditionalOnClass found required class 'com.zaxxer.hikari.HikariDataSource' (OnClassCondition)
- #ConditionalOnProperty (spring.datasource.type=com.zaxxer.hikari.HikariDataSource) matched (OnPropertyCondition)
- #ConditionalOnMissingBean (types: javax.sql.DataSource; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourceInitializationConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.jdbc.datasource.init.DatabasePopulator' (OnClassCondition)
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a single bean 'dataSource'; #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.sql.init.SqlDataSourceScriptDatabaseInitializer,org.springframework.boot.autoconfigure.sql.init.SqlR2dbcScriptDatabaseInitializer; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourcePoolMetadataProvidersConfiguration.HikariPoolDataSourceMetadataProviderConfiguration matched:
- #ConditionalOnClass found required class 'com.zaxxer.hikari.HikariDataSource' (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.jdbc.core.JdbcTemplate', 'org.springframework.transaction.TransactionManager' (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration.JdbcTransactionManagerConfiguration matched:
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a single bean 'dataSource' (OnBeanCondition)
FlywayAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.flywaydb.core.Flyway' (OnClassCondition)
- #ConditionalOnProperty (spring.flyway.enabled) matched (OnPropertyCondition)
- AnyNestedCondition 2 matched 0 did not; NestedCondition on FlywayAutoConfiguration.FlywayDataSourceCondition.FlywayUrlCondition #ConditionalOnProperty (spring.flyway.url) matched; NestedCondition on FlywayAutoConfiguration.FlywayDataSourceCondition.DataSourceBeanCondition #ConditionalOnBean (types: javax.sql.DataSource; SearchStrategy: all) found bean 'dataSource' (FlywayAutoConfiguration.FlywayDataSourceCondition)
FlywayAutoConfiguration.FlywayConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.jdbc.support.JdbcUtils' (OnClassCondition)
- #ConditionalOnMissingBean (types: org.flywaydb.core.Flyway; SearchStrategy: all) did not find any beans (OnBeanCondition)
GenericCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration automatic cache type (CacheCondition)
HibernateJpaAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean', 'javax.persistence.EntityManager', 'org.hibernate.engine.spi.SessionImplementor' (OnClassCondition)
HibernateJpaConfiguration matched:
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a single bean 'dataSource' (OnBeanCondition)
JacksonAutoConfiguration matched:
- #ConditionalOnClass found required class 'com.fasterxml.jackson.databind.ObjectMapper' (OnClassCondition)
JacksonAutoConfiguration.Jackson2ObjectMapperBuilderCustomizerConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperBuilderConfiguration#jacksonObjectMapperBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonAutoConfiguration.JacksonObjectMapperConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.http.converter.json.Jackson2ObjectMapperBuilder' (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperConfiguration#jacksonObjectMapper matched:
- #ConditionalOnMissingBean (types: com.fasterxml.jackson.databind.ObjectMapper; SearchStrategy: all) did not find any beans (OnBeanCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration matched:
- #ConditionalOnClass found required class 'com.fasterxml.jackson.module.paramnames.ParameterNamesModule' (OnClassCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration#parameterNamesModule matched:
- #ConditionalOnMissingBean (types: com.fasterxml.jackson.module.paramnames.ParameterNamesModule; SearchStrategy: all) did not find any beans (OnBeanCondition)
JdbcTemplateAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.sql.DataSource', 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a single bean 'dataSource' (OnBeanCondition)
JdbcTemplateConfiguration matched:
- #ConditionalOnMissingBean (types: org.springframework.jdbc.core.JdbcOperations; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#entityManagerFactory matched:
- #ConditionalOnMissingBean (types: org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean,javax.persistence.EntityManagerFactory; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#entityManagerFactoryBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#jpaVendorAdapter matched:
- #ConditionalOnMissingBean (types: org.springframework.orm.jpa.JpaVendorAdapter; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#transactionManager matched:
- #ConditionalOnMissingBean (types: org.springframework.transaction.TransactionManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
JtaAutoConfiguration matched:
- #ConditionalOnClass found required class 'javax.transaction.Transaction' (OnClassCondition)
- #ConditionalOnProperty (spring.jta.enabled) matched (OnPropertyCondition)
LifecycleAutoConfiguration#defaultLifecycleProcessor matched:
- #ConditionalOnMissingBean (names: lifecycleProcessor; SearchStrategy: current) did not find any beans (OnBeanCondition)
NamedParameterJdbcTemplateConfiguration matched:
- #ConditionalOnSingleCandidate (types: org.springframework.jdbc.core.JdbcTemplate; SearchStrategy: all) found a single bean 'jdbcTemplate'; #ConditionalOnMissingBean (types: org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; SearchStrategy: all) did not find any beans (OnBeanCondition)
NoOpCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration automatic cache type (CacheCondition)
PersistenceExceptionTranslationAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor' (OnClassCondition)
PersistenceExceptionTranslationAutoConfiguration#persistenceExceptionTranslationPostProcessor matched:
- #ConditionalOnProperty (spring.dao.exceptiontranslation.enabled) matched (OnPropertyCondition)
- #ConditionalOnMissingBean (types: org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; SearchStrategy: all) did not find any beans (OnBeanCondition)
PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer matched:
- #ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) did not find any beans (OnBeanCondition)
RestTemplateAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.web.client.RestTemplate' (OnClassCondition)
- NoneNestedConditions 0 matched 1 did not; NestedCondition on RestTemplateAutoConfiguration.NotReactiveWebApplicationCondition.ReactiveWebApplication did not find reactive web application classes (RestTemplateAutoConfiguration.NotReactiveWebApplicationCondition)
RestTemplateAutoConfiguration#restTemplateBuilderConfigurer matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.client.RestTemplateBuilderConfigurer; SearchStrategy: all) did not find any beans (OnBeanCondition)
SimpleCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration automatic cache type (CacheCondition)
SqlInitializationAutoConfiguration matched:
- #ConditionalOnProperty (spring.sql.init.enabled) matched (OnPropertyCondition)
- NoneNestedConditions 0 matched 1 did not; NestedCondition on SqlInitializationAutoConfiguration.SqlInitializationModeCondition.ModeIsNever #ConditionalOnProperty (spring.sql.init.mode=never) did not find property 'mode' (SqlInitializationAutoConfiguration.SqlInitializationModeCondition)
TemplateEngineConfigurations.DefaultTemplateEngineConfiguration#templateEngine matched:
- #ConditionalOnMissingBean (types: org.thymeleaf.spring5.ISpringTemplateEngine; SearchStrategy: all) did not find any beans (OnBeanCondition)
ThymeleafAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.thymeleaf.templatemode.TemplateMode', 'org.thymeleaf.spring5.SpringTemplateEngine' (OnClassCondition)
ThymeleafAutoConfiguration.DefaultTemplateResolverConfiguration matched:
- #ConditionalOnMissingBean (names: defaultTemplateResolver; SearchStrategy: all) did not find any beans (OnBeanCondition)
ThymeleafAutoConfiguration.ThymeleafJava8TimeDialect matched:
- #ConditionalOnClass found required class 'org.thymeleaf.extras.java8time.dialect.Java8TimeDialect' (OnClassCondition)
ThymeleafAutoConfiguration.ThymeleafJava8TimeDialect#java8TimeDialect matched:
- #ConditionalOnMissingBean (types: org.thymeleaf.extras.java8time.dialect.Java8TimeDialect; SearchStrategy: all) did not find any beans (OnBeanCondition)
TransactionAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.transaction.PlatformTransactionManager' (OnClassCondition)
TransactionAutoConfiguration#platformTransactionManagerCustomizers matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers; SearchStrategy: all) did not find any beans (OnBeanCondition)
TransactionAutoConfiguration.EnableTransactionManagementConfiguration matched:
- #ConditionalOnBean (types: org.springframework.transaction.TransactionManager; SearchStrategy: all) found bean 'transactionManager'; #ConditionalOnMissingBean (types: org.springframework.transaction.annotation.AbstractTransactionManagementConfiguration; SearchStrategy: all) did not find any beans (OnBeanCondition)
TransactionAutoConfiguration.EnableTransactionManagementConfiguration.CglibAutoProxyConfiguration matched:
- #ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)
TransactionAutoConfiguration.TransactionTemplateConfiguration matched:
- #ConditionalOnSingleCandidate (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) found a single bean 'transactionManager' (OnBeanCondition)
TransactionAutoConfiguration.TransactionTemplateConfiguration#transactionTemplate matched:
- #ConditionalOnMissingBean (types: org.springframework.transaction.support.TransactionOperations; SearchStrategy: all) did not find any beans (OnBeanCondition)
ValidationAutoConfiguration matched:
- #ConditionalOnClass found required class 'javax.validation.executable.ExecutableValidator' (OnClassCondition)
- #ConditionalOnResource found location classpath:META-INF/services/javax.validation.spi.ValidationProvider (OnResourceCondition)
ValidationAutoConfiguration#defaultValidator matched:
- #ConditionalOnMissingBean (types: javax.validation.Validator; SearchStrategy: all) did not find any beans (OnBeanCondition)
ValidationAutoConfiguration#methodValidationPostProcessor matched:
- #ConditionalOnMissingBean (types: org.springframework.validation.beanvalidation.MethodValidationPostProcessor; SearchStrategy: current) did not find any beans (OnBeanCondition)
Exclusions:
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration
Unconditional classes:
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration
org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
[INFO ] [10-09-2022 17:19:16,674 [DefaultDispatcher-worker-2] SpringApplication:org.springframework.boot.StartupInfoLogger.logStarted(StartupInfoLogger.java:61)]:Started application in 5.61 seconds (JVM running for 7.131)
My application is a web application and I am able to hit endpoints successfully when run using "mvn spring-boot:run". Only problem is application shuts down when run in debug mode in intellij and not able to debug my application.
pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/> <!-- lookup parent body repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Output:
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
.....
Negative matches:
-----------------
ActiveMQAutoConfiguration:
Did not match:
- #ConditionalOnMissingBean (types: javax.jms.ConnectionFactory; SearchStrategy: all) found bean 'getConnectionFactory' (OnBeanCondition)
Matched:
- #ConditionalOnClass found required classes 'javax.jms.ConnectionFactory', 'org.apache.activemq.ActiveMQConnectionFactory'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
ActiveMQConnectionFactoryConfiguration.PooledConnectionFactoryConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.activemq.pool.PooledConnectionFactory' (OnClassCondition)
ActiveMQXAConnectionFactoryConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' (OnClassCondition)
AopAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.aspectj.lang.annotation.Aspect', 'org.aspectj.lang.reflect.Advice' (OnClassCondition)
ArtemisAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory' (OnClassCondition)
BatchAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.batch.core.launch.JobLauncher', 'org.springframework.jdbc.core.JdbcOperations' (OnClassCondition)
CacheAutoConfiguration:
Did not match:
- #ConditionalOnBean (types: org.springframework.cache.interceptor.CacheAspectSupport; SearchStrategy: all) did not find any beans (OnBeanCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.cache.CacheManager'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
CacheAutoConfiguration.CacheManagerJpaDependencyConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean' (OnClassCondition)
- Ancestor org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration did not match (ConditionEvaluationReport.AncestorsMatchedCondition)
CaffeineCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.github.benmanes.caffeine.cache.Caffeine', 'org.springframework.cache.caffeine.CaffeineCacheManager' (OnClassCondition)
CassandraAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.datastax.driver.core.Cluster' (OnClassCondition)
CassandraDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.datastax.driver.core.Cluster', 'org.springframework.data.cassandra.core.CassandraAdminOperations' (OnClassCondition)
CassandraRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.datastax.driver.core.Session', 'org.springframework.data.cassandra.repository.CassandraRepository' (OnClassCondition)
CloudAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.cloud.config.java.CloudScanConfiguration' (OnClassCondition)
CouchbaseAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.couchbase.client.java.CouchbaseBucket', 'com.couchbase.client.java.Cluster' (OnClassCondition)
CouchbaseCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.couchbase.client.java.Bucket', 'com.couchbase.client.spring.cache.CouchbaseCacheManager' (OnClassCondition)
CouchbaseDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.couchbase.client.java.Bucket', 'org.springframework.data.couchbase.repository.CouchbaseRepository' (OnClassCondition)
CouchbaseRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.couchbase.client.java.Bucket', 'org.springframework.data.couchbase.repository.CouchbaseRepository' (OnClassCondition)
DataSourceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)
DeviceDelegatingViewResolverAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.mobile.device.view.LiteDeviceDelegatingViewResolver' (OnClassCondition)
DeviceResolverAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.mobile.device.DeviceResolverHandlerInterceptor', 'org.springframework.mobile.device.DeviceHandlerMethodArgumentResolver' (OnClassCondition)
DispatcherServletAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
EhCacheCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'net.sf.ehcache.Cache', 'org.springframework.cache.ehcache.EhCacheCacheManager' (OnClassCondition)
ElasticsearchAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.elasticsearch.client.Client', 'org.springframework.data.elasticsearch.client.TransportClientFactoryBean', 'org.springframework.data.elasticsearch.client.NodeClientFactoryBean' (OnClassCondition)
ElasticsearchDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.elasticsearch.client.Client', 'org.springframework.data.elasticsearch.core.ElasticsearchTemplate' (OnClassCondition)
ElasticsearchRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.elasticsearch.client.Client', 'org.springframework.data.elasticsearch.repository.ElasticsearchRepository' (OnClassCondition)
EmbeddedLdapAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.unboundid.ldap.listener.InMemoryDirectoryServer' (OnClassCondition)
EmbeddedMongoAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.mongodb.Mongo', 'de.flapdoodle.embed.mongo.MongodStarter' (OnClassCondition)
EmbeddedServletContainerAutoConfiguration:
Did not match:
- #ConditionalOnWebApplication (required) not a web application (OnWebApplicationCondition)
ErrorMvcAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.servlet.Servlet', 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
FacebookAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.social.config.annotation.SocialConfigurerAdapter', 'org.springframework.social.facebook.connect.FacebookConnectionFactory' (OnClassCondition)
FallbackWebSecurityAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.config.annotation.web.configuration.EnableWebSecurity' (OnClassCondition)
FlywayAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.flywaydb.core.Flyway' (OnClassCondition)
FreeMarkerAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'freemarker.template.Configuration', 'org.springframework.ui.freemarker.FreeMarkerConfigurationFactory' (OnClassCondition)
GroovyTemplateAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'groovy.text.markup.MarkupTemplateEngine' (OnClassCondition)
GsonAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.google.gson.Gson' (OnClassCondition)
GsonHttpMessageConvertersConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.google.gson.Gson' (OnClassCondition)
GuavaCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.google.common.cache.CacheBuilder', 'org.springframework.cache.guava.GuavaCacheManager' (OnClassCondition)
H2ConsoleAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.h2.server.web.WebServlet' (OnClassCondition)
HazelcastAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.hazelcast.core.HazelcastInstance' (OnClassCondition)
HazelcastCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.hazelcast.core.HazelcastInstance', 'com.hazelcast.spring.cache.HazelcastCacheManager' (OnClassCondition)
HazelcastJpaDependencyAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.hazelcast.core.HazelcastInstance', 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean' (OnClassCondition)
HibernateJpaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean', 'javax.persistence.EntityManager' (OnClassCondition)
HttpEncodingAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.filter.CharacterEncodingFilter' (OnClassCondition)
HypermediaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.hateoas.Resource', 'org.springframework.plugin.core.Plugin' (OnClassCondition)
InfinispanCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.infinispan.spring.provider.SpringEmbeddedCacheManager' (OnClassCondition)
IntegrationAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.integration.config.EnableIntegration' (OnClassCondition)
JCacheCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.cache.Caching', 'org.springframework.cache.jcache.JCacheCacheManager' (OnClassCondition)
JacksonAutoConfiguration.JodaDateTimeJacksonConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.joda.time.DateTime', 'com.fasterxml.jackson.datatype.joda.ser.DateTimeSerializer', 'com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaDateFormat' (OnClassCondition)
JacksonAutoConfiguration.ParameterNamesModuleConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.fasterxml.jackson.module.paramnames.ParameterNamesModule' (OnClassCondition)
JacksonHttpMessageConvertersConfiguration.MappingJackson2XmlHttpMessageConverterConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.fasterxml.jackson.dataformat.xml.XmlMapper' (OnClassCondition)
JdbcTemplateAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.core.JdbcTemplate' (OnClassCondition)
JerseyAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.glassfish.jersey.server.spring.SpringComponentProvider', 'javax.servlet.ServletRegistration' (OnClassCondition)
JestAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'io.searchbox.client.JestClient' (OnClassCondition)
JmsAnnotationDrivenConfiguration.JndiConfiguration:
Did not match:
- #ConditionalOnJndi JNDI environment is not available (OnJndiCondition)
JmsAutoConfiguration.JmsTemplateConfiguration#jmsTemplate:
Did not match:
- #ConditionalOnMissingBean (types: org.springframework.jms.core.JmsTemplate; SearchStrategy: all) found bean 'getJmsTemplate' (OnBeanCondition)
JndiConnectionFactoryAutoConfiguration:
Did not match:
- AnyNestedCondition 0 matched 2 did not; NestedCondition on JndiConnectionFactoryAutoConfiguration.JndiOrPropertyCondition.Property #ConditionalOnProperty (spring.jms.jndi-name) did not find property 'jndi-name'; NestedCondition on JndiConnectionFactoryAutoConfiguration.JndiOrPropertyCondition.Jndi #ConditionalOnJndi JNDI environment is not available (JndiConnectionFactoryAutoConfiguration.JndiOrPropertyCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.jms.core.JmsTemplate'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
JndiDataSourceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
JooqAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.jooq.DSLContext' (OnClassCondition)
JpaRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.jpa.repository.JpaRepository' (OnClassCondition)
JtaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.transaction.Transaction' (OnClassCondition)
KafkaAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.kafka.core.KafkaTemplate' (OnClassCondition)
LdapAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.ldap.core.ContextSource' (OnClassCondition)
LdapDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.ldap.repository.LdapRepository' (OnClassCondition)
LdapRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.ldap.repository.LdapRepository' (OnClassCondition)
LinkedInAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.social.config.annotation.SocialConfigurerAdapter', 'org.springframework.social.linkedin.connect.LinkedInConnectionFactory' (OnClassCondition)
LiquibaseAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'liquibase.integration.spring.SpringLiquibase' (OnClassCondition)
MailSenderAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'javax.mail.internet.MimeMessage' (OnClassCondition)
MailSenderValidatorAutoConfiguration:
Did not match:
- #ConditionalOnProperty (spring.mail.test-connection) did not find property 'test-connection' (OnPropertyCondition)
MessageSourceAutoConfiguration:
Did not match:
- ResourceBundle did not find bundle with basename messages (MessageSourceAutoConfiguration.ResourceBundleCondition)
MongoAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.mongodb.MongoClient' (OnClassCondition)
MongoDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.mongodb.Mongo', 'org.springframework.data.mongodb.core.MongoTemplate' (OnClassCondition)
MongoRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.mongodb.Mongo', 'org.springframework.data.mongodb.repository.MongoRepository' (OnClassCondition)
MultipartAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.servlet.Servlet', 'javax.servlet.MultipartConfigElement' (OnClassCondition)
MustacheAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.samskivert.mustache.Mustache' (OnClassCondition)
Neo4jDataAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.neo4j.ogm.session.SessionFactory' (OnClassCondition)
Neo4jRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.neo4j.ogm.session.Neo4jSession', 'org.springframework.data.neo4j.repository.GraphRepository' (OnClassCondition)
OAuth2AutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.security.oauth2.common.OAuth2AccessToken' (OnClassCondition)
ProjectInfoAutoConfiguration#buildProperties:
Did not match:
- #ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}' (OnResourceCondition)
ProjectInfoAutoConfiguration#gitProperties:
Did not match:
- GitResource did not find git info at classpath:git.properties (ProjectInfoAutoConfiguration.GitResourceAvailableCondition)
RabbitAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.amqp.rabbit.core.RabbitTemplate', 'com.rabbitmq.client.Channel' (OnClassCondition)
ReactorAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'reactor.spring.context.config.EnableReactor', 'reactor.Environment' (OnClassCondition)
RedisAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.data.redis.connection.jedis.JedisConnection', 'org.springframework.data.redis.core.RedisOperations', 'redis.clients.jedis.Jedis' (OnClassCondition)
RedisRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'redis.clients.jedis.Jedis', 'org.springframework.data.redis.repository.configuration.EnableRedisRepositories' (OnClassCondition)
RepositoryRestMvcAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration' (OnClassCondition)
SecurityAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.security.authentication.AuthenticationManager', 'org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter' (OnClassCondition)
SecurityFilterAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer', 'org.springframework.security.config.http.SessionCreationPolicy' (OnClassCondition)
SendGridAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.sendgrid.SendGrid' (OnClassCondition)
ServerPropertiesAutoConfiguration:
Did not match:
- #ConditionalOnWebApplication (required) not a web application (OnWebApplicationCondition)
SessionAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.session.Session' (OnClassCondition)
SitePreferenceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.mobile.device.site.SitePreferenceHandlerInterceptor', 'org.springframework.mobile.device.site.SitePreferenceHandlerMethodArgumentResolver' (OnClassCondition)
SocialWebAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.social.connect.web.ConnectController', 'org.springframework.social.config.annotation.SocialConfigurerAdapter' (OnClassCondition)
SolrAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.apache.solr.client.solrj.impl.HttpSolrClient', 'org.apache.solr.client.solrj.impl.CloudSolrClient' (OnClassCondition)
SolrRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.apache.solr.client.solrj.SolrClient', 'org.springframework.data.solr.repository.SolrRepository' (OnClassCondition)
SpringApplicationAdminJmxAutoConfiguration:
Did not match:
- #ConditionalOnProperty (spring.application.admin.enabled=true) did not find property 'enabled' (OnPropertyCondition)
SpringDataWebAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.data.web.PageableHandlerMethodArgumentResolver' (OnClassCondition)
ThymeleafAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.thymeleaf.spring4.SpringTemplateEngine' (OnClassCondition)
TransactionAutoConfiguration.TransactionTemplateConfiguration:
Did not match:
- #ConditionalOnSingleCandidate (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
TwitterAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'org.springframework.social.config.annotation.SocialConfigurerAdapter', 'org.springframework.social.twitter.connect.TwitterConnectionFactory' (OnClassCondition)
WebMvcAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.servlet.Servlet', 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
WebServicesAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.ws.transport.http.MessageDispatcherServlet' (OnClassCondition)
WebSocketAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.servlet.Servlet', 'javax.websocket.server.ServerContainer' (OnClassCondition)
WebSocketMessagingAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer' (OnClassCondition)
XADataSourceAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.transaction.TransactionManager', 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' (OnClassCondition)
Exclusions:
-----------
None
Unconditional classes:
----------------------
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
2017-03-09 09:09:34.931 INFO 3496 --- [ main] c.abc.jms.SpringbootJmsApplication : Started SpringbootJmsApplication in 2.995 seconds (JVM running for 3.682)
68
2017-03-09 09:09:34.946 INFO 3496 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#1f97cf0d: startup date [Thu Mar 09 09:09:32 CST 2017]; root of context hierarchy
2017-03-09 09:09:34.946 INFO 3496 --- [ Thread-2] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647
2017-03-09 09:09:34.946 INFO 3496 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
Disconnected from the target VM, address: '127.0.0.1:51873', transport: 'socket'
Process finished with exit code 0
You can ignore these kind of errors and as Rohit mentioned, include the line in the application.properties and it after another compile or run it will tell you what is wrong with your code.
logging.level.org.springframework.boot.autoconfigure=ERROR
Try delete the idea related settings files. It might happened due to renaming of the project folder.
Write this line in application.properties file:
logging.level.org.springframework.boot.autoconfigure=ERROR
The setup:
a JPA ReviewRepository extending CrudRepository<TEntity, TId>
My test uses the slice test annotation #DataJpaTest
My test #Autowired ReviewRepository repo
The problem:
My #Autowired fails and raises a NoSuchBeanDefinitionException saying that there is no Bean qualified to be injected into my ReviewRepository repo field.
Things I've tried:
With and without #ContextConfiguration(classes = AppEntry.class)
With and without #EnableJpaRepositories in my AppEntry class
The Error:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'boxfish.apis.youtube.channelDiscovery.reviews.domain.reviews.ReviewRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
Code for ReviewRepositoryTest.java
#RunWith(SpringJUnit4ClassRunner.class)
#ContextConfiguration(classes = AppEntry.class)
#ActiveProfiles(INTEGRATION)
#DataJpaTest
#AutoConfigureTestDatabase(replace = NONE)
#Transactional
public class ReviewRepositoryTest {
#Autowired
private ReviewRepository repo;
#Test
public void findOneByExpansionIdAndPartIdInAndType() {
assertTrue(true);
}
}
Code for ReviewRepository.java
public interface ReviewRepository extends CrudRepository<ReviewEntity, ReviewEntityId> {
}
Code for AppEntry.java
#SpringBootApplication
#EnableJpaRepositories
public class AppEntry {
public static void main(final String[] args) {
SpringApplication.run(AppEntry.class, args);
}
}
Spring Boot Auto Configuration Report
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
DataSourceAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.sql.DataSource', 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
DataSourceAutoConfiguration#dataSourceInitializer matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourceAutoConfiguration.PooledDataSourceConfiguration matched:
- AnyNestedCondition 1 matched 1 did not; NestedCondition on DataSourceAutoConfiguration.PooledDataSourceCondition.PooledDataSourceAvailable PooledDataSource found supported DataSource; NestedCondition on DataSourceAutoConfiguration.PooledDataSourceCondition.ExplicitType #ConditionalOnProperty (spring.datasource.type) did not find property 'type' (DataSourceAutoConfiguration.PooledDataSourceCondition)
- #ConditionalOnMissingBean (types: javax.sql.DataSource,javax.sql.XADataSource; SearchStrategy: all) did not find any beans (OnBeanCondition)
DataSourceConfiguration.Tomcat matched:
- #ConditionalOnClass found required class 'org.apache.tomcat.jdbc.pool.DataSource'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnProperty (spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource) matched (OnPropertyCondition)
DataSourcePoolMetadataProvidersConfiguration.TomcatDataSourcePoolMetadataProviderConfiguration matched:
- #ConditionalOnClass found required class 'org.apache.tomcat.jdbc.pool.DataSource'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.jdbc.core.JdbcTemplate', 'org.springframework.transaction.PlatformTransactionManager'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration matched:
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a primary bean from beans 'dataSource' (OnBeanCondition)
DataSourceTransactionManagerAutoConfiguration.TransactionManagementConfiguration matched:
- #ConditionalOnMissingBean (types: org.springframework.transaction.annotation.AbstractTransactionManagementConfiguration; SearchStrategy: all) did not find any beans (OnBeanCondition)
FlywayAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.flywaydb.core.Flyway'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnProperty (flyway.enabled) matched (OnPropertyCondition)
- #ConditionalOnBean (types: javax.sql.DataSource; SearchStrategy: all) found bean 'dataSource' (OnBeanCondition)
FlywayAutoConfiguration.FlywayConfiguration matched:
- #ConditionalOnMissingBean (types: org.flywaydb.core.Flyway; SearchStrategy: all) did not find any beans (OnBeanCondition)
FlywayAutoConfiguration.FlywayConfiguration#flywayInitializer matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer; SearchStrategy: all) did not find any beans (OnBeanCondition)
FlywayAutoConfiguration.FlywayConfiguration.FlywayInitializerJpaDependencyConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnBean (types: org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; SearchStrategy: all) found bean '&entityManagerFactory' (OnBeanCondition)
FlywayAutoConfiguration.FlywayJpaDependencyConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnBean (types: org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; SearchStrategy: all) found bean '&entityManagerFactory' (OnBeanCondition)
HibernateJpaAutoConfiguration matched:
- #ConditionalOnClass found required classes 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean', 'org.springframework.transaction.annotation.EnableTransactionManagement', 'javax.persistence.EntityManager'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- HibernateEntityManager found class 'org.hibernate.ejb.HibernateEntityManager' (HibernateJpaAutoConfiguration.HibernateEntityManagerCondition)
JdbcTemplateAutoConfiguration matched:
- #ConditionalOnClass found required classes 'javax.sql.DataSource', 'org.springframework.jdbc.core.JdbcTemplate'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a primary bean from beans 'dataSource' (OnBeanCondition)
JdbcTemplateAutoConfiguration#jdbcTemplate matched:
- #ConditionalOnMissingBean (types: org.springframework.jdbc.core.JdbcOperations; SearchStrategy: all) did not find any beans (OnBeanCondition)
JdbcTemplateAutoConfiguration#namedParameterJdbcTemplate matched:
- #ConditionalOnMissingBean (types: org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#entityManagerFactory matched:
- #ConditionalOnMissingBean (types: org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean,javax.persistence.EntityManagerFactory; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#entityManagerFactoryBuilder matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#jpaVendorAdapter matched:
- #ConditionalOnMissingBean (types: org.springframework.orm.jpa.JpaVendorAdapter; SearchStrategy: all) did not find any beans (OnBeanCondition)
JpaBaseConfiguration#transactionManager matched:
- #ConditionalOnMissingBean (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
NoOpCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration NONE cache type (CacheCondition)
TestEntityManagerAutoConfiguration matched:
- #ConditionalOnClass found required class 'javax.persistence.EntityManagerFactory'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
TestEntityManagerAutoConfiguration#testEntityManager matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager; SearchStrategy: all) did not find any beans (OnBeanCondition)
TransactionAutoConfiguration matched:
- #ConditionalOnClass found required class 'org.springframework.transaction.PlatformTransactionManager'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
TransactionAutoConfiguration#platformTransactionManagerCustomizers matched:
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers; SearchStrategy: all) did not find any beans (OnBeanCondition)
TransactionAutoConfiguration.TransactionTemplateConfiguration matched:
- #ConditionalOnSingleCandidate (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) found a primary bean from beans 'transactionManager' (OnBeanCondition)
TransactionAutoConfiguration.TransactionTemplateConfiguration#transactionTemplate matched:
- #ConditionalOnMissingBean (types: org.springframework.transaction.support.TransactionTemplate; SearchStrategy: all) did not find any beans (OnBeanCondition)
Negative matches:
-----------------
CacheAutoConfiguration:
Did not match:
- #ConditionalOnBean (types: org.springframework.cache.interceptor.CacheAspectSupport; SearchStrategy: all) did not find any beans (OnBeanCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.cache.CacheManager'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
CacheAutoConfiguration.CacheManagerJpaDependencyConfiguration:
Did not match:
- Ancestor org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration did not match (ConditionEvaluationReport.AncestorsMatchedCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
CaffeineCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.github.benmanes.caffeine.cache.Caffeine', 'org.springframework.cache.caffeine.CaffeineCacheManager' (OnClassCondition)
CouchbaseCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.couchbase.client.java.Bucket', 'com.couchbase.client.spring.cache.CouchbaseCacheManager' (OnClassCondition)
DataSourceAutoConfiguration.EmbeddedDatabaseConfiguration:
Did not match:
- EmbeddedDataSource found supported pooled data source (DataSourceAutoConfiguration.EmbeddedDatabaseCondition)
DataSourceAutoConfiguration.TomcatDataSourceJmxConfiguration:
Did not match:
- #ConditionalOnProperty (spring.datasource.jmx-enabled) did not find property 'jmx-enabled' (OnPropertyCondition)
Matched:
- #ConditionalOnClass found required class 'org.apache.tomcat.jdbc.pool.DataSourceProxy'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
DataSourceConfiguration.Dbcp:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.commons.dbcp.BasicDataSource' (OnClassCondition)
DataSourceConfiguration.Dbcp2:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.commons.dbcp2.BasicDataSource' (OnClassCondition)
DataSourceConfiguration.Generic:
Did not match:
- #ConditionalOnProperty (spring.datasource.type) did not find property 'spring.datasource.type' (OnPropertyCondition)
DataSourceConfiguration.Hikari:
Did not match:
- #ConditionalOnClass did not find required class 'com.zaxxer.hikari.HikariDataSource' (OnClassCondition)
DataSourcePoolMetadataProvidersConfiguration.CommonsDbcp2PoolDataSourceMetadataProviderConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.commons.dbcp2.BasicDataSource' (OnClassCondition)
DataSourcePoolMetadataProvidersConfiguration.CommonsDbcpPoolDataSourceMetadataProviderConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.apache.commons.dbcp.BasicDataSource' (OnClassCondition)
DataSourcePoolMetadataProvidersConfiguration.HikariPoolDataSourceMetadataProviderConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'com.zaxxer.hikari.HikariDataSource' (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration#transactionManager:
Did not match:
- #ConditionalOnMissingBean (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) found bean 'transactionManager' (OnBeanCondition)
EhCacheCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'net.sf.ehcache.Cache', 'org.springframework.cache.ehcache.EhCacheCacheManager' (OnClassCondition)
EurekaDiscoveryClientConfiguration:
Did not match:
- #ConditionalOnProperty (eureka.client.enabled) found different value in property 'eureka.client.enabled' (OnPropertyCondition)
Matched:
- #ConditionalOnClass found required class 'com.netflix.discovery.EurekaClientConfig'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
GenericCacheConfiguration:
Did not match:
- Cache org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration NONE cache type (CacheCondition)
GuavaCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.springframework.cache.guava.GuavaCacheManager' (OnClassCondition)
HazelcastCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'com.hazelcast.core.HazelcastInstance', 'com.hazelcast.spring.cache.HazelcastCacheManager' (OnClassCondition)
InfinispanCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'org.infinispan.spring.provider.SpringEmbeddedCacheManager' (OnClassCondition)
JCacheCacheConfiguration:
Did not match:
- #ConditionalOnClass did not find required classes 'javax.cache.Caching', 'org.springframework.cache.jcache.JCacheCacheManager' (OnClassCondition)
JpaBaseConfiguration.JpaWebConfiguration:
Did not match:
- #ConditionalOnWebApplication (required) not a web application (OnWebApplicationCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
JpaRepositoriesAutoConfiguration:
Did not match:
- #ConditionalOnMissingBean (types: org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean,org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension; SearchStrategy: all) found bean 'org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension#0' (OnBeanCondition)
Matched:
- #ConditionalOnClass found required class 'org.springframework.data.jpa.repository.JpaRepository'; #ConditionalOnMissingClass did not find unwanted class (OnClassCondition)
- #ConditionalOnProperty (spring.data.jpa.repositories.enabled=true) matched (OnPropertyCondition)
LiquibaseAutoConfiguration:
Did not match:
- #ConditionalOnClass did not find required class 'liquibase.integration.spring.SpringLiquibase' (OnClassCondition)
RedisCacheConfiguration:
Did not match:
- Cache org.springframework.boot.autoconfigure.cache.RedisCacheConfiguration NONE cache type (CacheCondition)
SimpleCacheConfiguration:
Did not match:
- Cache org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration NONE cache type (CacheCondition)
TestDatabaseAutoConfiguration#dataSource:
Did not match:
- #ConditionalOnProperty (spring.test.database.replace=AUTO_CONFIGURED) found different value in property 'replace' (OnPropertyCondition)
TestDatabaseAutoConfiguration#embeddedDataSourceBeanFactoryPostProcessor:
Did not match:
- #ConditionalOnProperty (spring.test.database.replace=ANY) found different value in property 'replace' (OnPropertyCondition)
Exclusions:
-----------
None
Unconditional classes:
----------------------
org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration
This problem is solved
Not much later than the question was posted, I found the answer: my classpath was compromised. I had two natures enabled in my eclipse project (Spring STS and Gradle) and they following happened:
Both plugins imported dependencies for Spring-JPA
This has caused Spring Autoconfigurator to be confused about which Repository resolution routine to use and entered strict mode
After that, my interfaces implementing CrudRepository would not receive an implementation coming from Spring Data JPA
How have I found this?
It was right there, under my nose, not in an error, but in a shy corner of the startup log (INFO):
14:26:40.729 [main] INFO b.a.y.c.r.i.ReviewUpserIntegrationTest - The following profiles are active: integration
14:26:40.734 [main] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#7de4a01f: startup date [Thu Mar 02 14:26:40 GMT 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#130e116b
14:26:41.521 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
14:26:41.562 [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data JPA - Could not safely identify store assignment for repository candidate interface boxfish.apis.youtube.channelDiscovery.reviews.domain.reviews.ReviewRepository.
14:26:41.943 [main] WARN o.s.c.a.ConfigurationClassPostProcessor - Cannot enhance #Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static #Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
The line we are talking about is Multiple Spring Data modules found, entering strict repository configuration mode!
A good cleanup and de-activation of the natures in Eclipse have solved the problem:
gradle clean cleanEclipse eclipse build --refresh-dependencies in the Shell
Refresh of the project in eclipse
I've tried to create simple webapps springboot with dependencies: web, postgresql, jdbc, vaadin.
When start to run my apps, the apps won't start and there are exception thrown.
The exception telling "..no qualifying bean of type JdbcTemplate".
Some suggestion in stackoverflow to add artifact spring-boot-starter-jdbc, but my pom already did it and still won't work.
Below my config
src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/sehati
spring.datasource.username=sehati
spring.datasource.password=password
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sehatigroup</groupId>
<artifactId>siapotek</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>siapotek</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<!--
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>7.6.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Main class:
#SpringBootApplication
public class SiaApplication {
public static void main(String[] args) {
SpringApplication.run(SiaApplication.class, args);
}
}
VadinUI:
#SpringUI
#Theme("valo")
public class SehatiDashboardUI extends UI {
#Override
protected void init(VaadinRequest request) {
setContent(new Label("Hello World"));
}
}
Spring component:
#Component
public class LookupService {
#Autowired
private JdbcTemplate jdbcTemplate;
public List<Lookup> findAll() {
return jdbcTemplate.query("select id, type, label, name from lookup",
(rs, rowNum) -> new Lookup(rs.getLong("id"), rs.getString("type"), rs.getString("label"), rs.getString("label")));
}
}
The console output:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
2016-08-15 07:03:09.329 INFO 1387 --- [ main] com.sehatigroup.SiaApplication : Starting SiaApplication on learn2fly with PID 1387 (/home/hameed/workspace/siapotek/target/classes started by hameed in /home/hameed/workspace/siapotek)
2016-08-15 07:03:09.333 INFO 1387 --- [ main] com.sehatigroup.SiaApplication : No active profile set, falling back to default profiles: default
2016-08-15 07:03:09.530 INFO 1387 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#5656be13: startup date [Mon Aug 15 07:03:09 WIB 2016]; root of context hierarchy
2016-08-15 07:03:11.329 WARN 1387 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance #Configuration bean definition 'com.vaadin.spring.VaadinConfiguration' since its singleton instance has been created too early. The typical cause is a non-static #Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2016-08-15 07:03:11.892 INFO 1387 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-08-15 07:03:12.069 INFO 1387 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$666445bd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-08-15 07:03:12.776 INFO 1387 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-08-15 07:03:12.795 INFO 1387 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-08-15 07:03:12.797 INFO 1387 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.4
2016-08-15 07:03:12.931 INFO 1387 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2016-08-15 07:03:12.932 INFO 1387 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3414 ms
2016-08-15 07:03:13.065 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Registering Vaadin servlet
2016-08-15 07:03:13.065 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Servlet will be mapped to URLs [/vaadinServlet/*, /VAADIN/*]
2016-08-15 07:03:13.086 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Setting servlet init parameters
2016-08-15 07:03:13.086 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [productionMode] = [false]
2016-08-15 07:03:13.086 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [resourceCacheTime] = [3600]
2016-08-15 07:03:13.087 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [heartbeatInterval] = [300]
2016-08-15 07:03:13.087 INFO 1387 --- [ost-startStop-1] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [closeIdleSessions] = [false]
2016-08-15 07:03:13.218 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-08-15 07:03:13.218 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-08-15 07:03:13.219 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-08-15 07:03:13.219 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2016-08-15 07:03:13.221 INFO 1387 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2016-08-15 07:03:13.221 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-08-15 07:03:13.223 INFO 1387 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'springVaadinServlet' to [/vaadinServlet/*, /VAADIN/*]
2016-08-15 07:03:13.302 WARN 1387 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'lookupService': Unsatisfied dependency expressed through field 'jdbcTemplate': No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency [org.springframework.jdbc.core.JdbcTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency [org.springframework.jdbc.core.JdbcTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
2016-08-15 07:03:13.307 INFO 1387 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat
2016-08-15 07:03:13.338 WARN 1387 --- [ main] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' is defined)
2016-08-15 07:03:13.355 ERROR 1387 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'lookupService': Unsatisfied dependency expressed through field 'jdbcTemplate': No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency [org.springframework.jdbc.core.JdbcTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency [org.springframework.jdbc.core.JdbcTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:569) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at com.sehatigroup.SiaApplication.main(SiaApplication.java:10) [classes/:na]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency [org.springframework.jdbc.core.JdbcTemplate]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {#org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1406) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1057) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 19 common frames omitted
And also i've try to use H2 database. My apps can started, but seemslike datasource connection always use pre-configured datasource from spring-boot-jdbc (url='jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false', username='sa'), even i've already described the new one in application.properties.
Could someone find what's wrong with my project?
Really appreciate your help.
I've try new IDE (eclipse, sts), create new workspace, import the project, create new project but still face some problem.
Finally my apps can running well after removing my .m2 folder. But i still don't know what happened in my mvn repository.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
2016-08-16 06:14:42.381 INFO 2531 --- [ main] com.sehatigroup.SiaApplication : Starting SiaApplication on learn2fly with PID 2531 (/home/hameed/workspace/siapotek/target/classes started by hameed in /home/hameed/workspace/siapotek)
2016-08-16 06:14:42.382 INFO 2531 --- [ main] com.sehatigroup.SiaApplication : No active profile set, falling back to default profiles: default
2016-08-16 06:14:42.382 DEBUG 2531 --- [ main] o.s.boot.SpringApplication : Loading source class com.sehatigroup.SiaApplication
2016-08-16 06:14:42.520 DEBUG 2531 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Loaded config file 'file:/home/hameed/workspace/siapotek/target/classes/application.properties' (classpath:/application.properties)
2016-08-16 06:14:42.520 DEBUG 2531 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped (empty) config file 'file:/home/hameed/workspace/siapotek/target/classes/application.properties' (classpath:/application.properties) for profile default
2016-08-16 06:14:42.526 INFO 2531 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3590fc5b: startup date [Tue Aug 16 06:14:42 WIB 2016]; root of context hierarchy
2016-08-16 06:14:42.529 DEBUG 2531 --- [ main] ationConfigEmbeddedWebApplicationContext : Bean factory for org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3590fc5b: org.springframework.beans.factory.support.DefaultListableBeanFactory#65f095f8: defining beans
-----CUTTED_TEXT----8<
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
AuthenticationManagerConfiguration matched
- #ConditionalOnBean (types: org.springframework.security.config.annotation.ObjectPostProcessor; SearchStrategy: all) found the following [objectPostProcessor] #ConditionalOnMissingBean (types: org.springframework.security.authentication.AuthenticationManager; SearchStrategy: all) found no beans (OnBeanCondition)
BootGlobalAuthenticationConfiguration matched
- #ConditionalOnClass classes found: org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter (OnClassCondition)
DataSourceAutoConfiguration matched
- #ConditionalOnClass classes found: javax.sql.DataSource,org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType (OnClassCondition)
DataSourceAutoConfiguration#dataSourceInitializer matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer; SearchStrategy: all) found no beans (OnBeanCondition)
DataSourceAutoConfiguration.PooledDataSourceConfiguration matched
- supported DataSource class found (DataSourceAutoConfiguration.PooledDataSourceCondition)
- #ConditionalOnMissingBean (types: javax.sql.DataSource,javax.sql.XADataSource; SearchStrategy: all) found no beans (OnBeanCondition)
DataSourceConfiguration.Tomcat matched
- #ConditionalOnClass classes found: org.apache.tomcat.jdbc.pool.DataSource (OnClassCondition)
- matched (OnPropertyCondition)
DataSourcePoolMetadataProvidersConfiguration.TomcatDataSourcePoolMetadataProviderConfiguration matched
- #ConditionalOnClass classes found: org.apache.tomcat.jdbc.pool.DataSource (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.jdbc.core.JdbcTemplate,org.springframework.transaction.PlatformTransactionManager (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration matched
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a primary candidate amongst the following [dataSource] (OnBeanCondition)
DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration#transactionManager matched
- #ConditionalOnMissingBean (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) found no beans (OnBeanCondition)
DataSourceTransactionManagerAutoConfiguration.TransactionManagementConfiguration matched
- #ConditionalOnMissingBean (types: org.springframework.transaction.annotation.AbstractTransactionManagementConfiguration; SearchStrategy: all) found no beans (OnBeanCondition)
DispatcherServletAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
DispatcherServletAutoConfiguration.DispatcherServletConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.ServletRegistration (OnClassCondition)
- no DispatcherServlet found (DispatcherServletAutoConfiguration.DefaultDispatcherServletCondition)
DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.ServletRegistration (OnClassCondition)
- no ServletRegistrationBean found (DispatcherServletAutoConfiguration.DispatcherServletRegistrationCondition)
DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration#dispatcherServletRegistration matched
- #ConditionalOnBean (names: dispatcherServlet; types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found the following [dispatcherServlet, dispatcherServlet] (OnBeanCondition)
EmbeddedServletContainerAutoConfiguration matched
- found web application StandardServletEnvironment (OnWebApplicationCondition)
EmbeddedServletContainerAutoConfiguration.EmbeddedTomcat matched
- #ConditionalOnClass classes found: javax.servlet.Servlet,org.apache.catalina.startup.Tomcat (OnClassCondition)
- #ConditionalOnMissingBean (types: org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
ErrorMvcAutoConfiguration#basicErrorController matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorController; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration#conventionErrorViewResolver matched
- #ConditionalOnBean (types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found the following [dispatcherServlet] #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.DefaultErrorViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration#errorAttributes matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorAttributes; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration matched
- No error template view detected (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
- matched (OnPropertyCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#beanNameViewResolver matched
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.view.BeanNameViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#defaultErrorView matched
- #ConditionalOnMissingBean (names: error; SearchStrategy: all) found no beans (OnBeanCondition)
GenericCacheConfiguration matched
- Automatic cache type (CacheCondition)
HttpEncodingAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.web.filter.CharacterEncodingFilter (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
- matched (OnPropertyCondition)
HttpEncodingAutoConfiguration#characterEncodingFilter matched
- #ConditionalOnMissingBean (types: org.springframework.web.filter.CharacterEncodingFilter; SearchStrategy: all) found no beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.http.converter.HttpMessageConverter (OnClassCondition)
HttpMessageConvertersAutoConfiguration#messageConverters matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.HttpMessageConverters; SearchStrategy: all) found no beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration.StringHttpMessageConverterConfiguration matched
- #ConditionalOnClass classes found: org.springframework.http.converter.StringHttpMessageConverter (OnClassCondition)
HttpMessageConvertersAutoConfiguration.StringHttpMessageConverterConfiguration#stringHttpMessageConverter matched
- #ConditionalOnMissingBean (types: org.springframework.http.converter.StringHttpMessageConverter; SearchStrategy: all) found no beans (OnBeanCondition)
-----CUTTED_TEXT----8<
JdbcTemplateAutoConfiguration matched
- #ConditionalOnClass classes found: javax.sql.DataSource (OnClassCondition)
- #ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a primary candidate amongst the following [dataSource] (OnBeanCondition)
JdbcTemplateAutoConfiguration#jdbcTemplate matched
- #ConditionalOnMissingBean (types: org.springframework.jdbc.core.JdbcOperations; SearchStrategy: all) found no beans (OnBeanCondition)
JdbcTemplateAutoConfiguration#namedParameterJdbcTemplate matched
- #ConditionalOnMissingBean (types: org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; SearchStrategy: all) found no beans (OnBeanCondition)
JmxAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.jmx.export.MBeanExporter (OnClassCondition)
- matched (OnPropertyCondition)
JmxAutoConfiguration#mbeanExporter matched
- #ConditionalOnMissingBean (types: org.springframework.jmx.export.MBeanExporter; SearchStrategy: current) found no beans (OnBeanCondition)
JmxAutoConfiguration#mbeanServer matched
- #ConditionalOnMissingBean (types: javax.management.MBeanServer; SearchStrategy: all) found no beans (OnBeanCondition)
JmxAutoConfiguration#objectNamingStrategy matched
- #ConditionalOnMissingBean (types: org.springframework.jmx.export.naming.ObjectNamingStrategy; SearchStrategy: current) found no beans (OnBeanCondition)
MultipartAutoConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.multipart.support.StandardServletMultipartResolver,javax.servlet.MultipartConfigElement (OnClassCondition)
- matched (OnPropertyCondition)
MultipartAutoConfiguration#multipartConfigElement matched
- #ConditionalOnMissingBean (types: javax.servlet.MultipartConfigElement; SearchStrategy: all) found no beans (OnBeanCondition)
MultipartAutoConfiguration#multipartResolver matched
- #ConditionalOnMissingBean (types: org.springframework.web.multipart.MultipartResolver; SearchStrategy: all) found no beans (OnBeanCondition)
NoOpCacheConfiguration matched
- Automatic cache type (CacheCondition)
PersistenceExceptionTranslationAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor (OnClassCondition)
PersistenceExceptionTranslationAutoConfiguration#persistenceExceptionTranslationPostProcessor matched
- #ConditionalOnMissingBean (types: org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; SearchStrategy: all) found no beans (OnBeanCondition)
- matched (OnPropertyCondition)
PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer matched
- #ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) found no beans (OnBeanCondition)
RedisCacheConfiguration matched
- Automatic cache type (CacheCondition)
SecurityAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.security.authentication.AuthenticationManager,org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter (OnClassCondition)
SecurityAutoConfiguration#authenticationEventPublisher matched
- #ConditionalOnMissingBean (types: org.springframework.security.authentication.AuthenticationEventPublisher; SearchStrategy: all) found no beans (OnBeanCondition)
SecurityAutoConfiguration#securityProperties matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.security.SecurityProperties; SearchStrategy: all) found no beans (OnBeanCondition)
SecurityFilterAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer,org.springframework.security.config.http.SessionCreationPolicy (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
SecurityFilterAutoConfiguration#securityFilterChainRegistration matched
- #ConditionalOnBean (names: springSecurityFilterChain; SearchStrategy: all) found the following [springSecurityFilterChain] (OnBeanCondition)
ServerPropertiesAutoConfiguration matched
- found web application StandardServletEnvironment (OnWebApplicationCondition)
ServerPropertiesAutoConfiguration#serverProperties matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ServerProperties; SearchStrategy: current) found no beans (OnBeanCondition)
SimpleCacheConfiguration matched
- Automatic cache type (CacheCondition)
SpringApplicationAdminJmxAutoConfiguration matched
- matched (OnPropertyCondition)
SpringApplicationAdminJmxAutoConfiguration#springApplicationAdminRegistrar matched
- #ConditionalOnMissingBean (types: org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar; SearchStrategy: all) found no beans (OnBeanCondition)
SpringBootWebSecurityConfiguration matched
- #ConditionalOnClass classes found: org.springframework.security.config.annotation.web.configuration.EnableWebSecurity,org.springframework.security.web.AuthenticationEntryPoint (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
- #ConditionalOnMissingBean (types: org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration; SearchStrategy: all) found no beans (OnBeanCondition)
SpringBootWebSecurityConfiguration#ignoredPathsWebSecurityConfigurerAdapter matched
- #ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration$IgnoredPathsWebSecurityConfigurerAdapter; SearchStrategy: all) found no beans (OnBeanCondition)
SpringBootWebSecurityConfiguration.ApplicationWebSecurityConfigurerAdapter matched
- matched (OnPropertyCondition)
TransactionAutoConfiguration matched
- #ConditionalOnClass classes found: org.springframework.transaction.support.TransactionTemplate,org.springframework.transaction.PlatformTransactionManager (OnClassCondition)
- #ConditionalOnSingleCandidate (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) found a primary candidate amongst the following [transactionManager] (OnBeanCondition)
TransactionAutoConfiguration#transactionTemplate matched
- #ConditionalOnMissingBean (types: org.springframework.transaction.support.TransactionTemplate; SearchStrategy: all) found no beans (OnBeanCondition)
VaadinAutoConfiguration matched
- #ConditionalOnClass classes found: com.vaadin.spring.annotation.SpringUI (OnClassCondition)
VaadinServletConfiguration#vaadinServlet matched
- #ConditionalOnMissingBean (types: com.vaadin.server.VaadinServlet; SearchStrategy: all) found no beans (OnBeanCondition)
WebClientAutoConfiguration.RestTemplateConfiguration matched
- #ConditionalOnClass classes found: org.springframework.web.client.RestTemplate (OnClassCondition)
WebClientAutoConfiguration.RestTemplateConfiguration#restTemplateBuilder matched
- #ConditionalOnMissingBean (types: org.springframework.boot.web.client.RestTemplateBuilder; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet,org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration#hiddenHttpMethodFilter matched
- #ConditionalOnMissingBean (types: org.springframework.web.filter.HiddenHttpMethodFilter; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration#httpPutFormContentFilter matched
- #ConditionalOnMissingBean (types: org.springframework.web.filter.HttpPutFormContentFilter; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#defaultViewResolver matched
- #ConditionalOnMissingBean (types: org.springframework.web.servlet.view.InternalResourceViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#requestContextFilter matched
- #ConditionalOnMissingBean (types: org.springframework.web.context.request.RequestContextListener,org.springframework.web.filter.RequestContextFilter; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#viewResolver matched
- #ConditionalOnBean (types: org.springframework.web.servlet.ViewResolver; SearchStrategy: all) found the following [defaultViewResolver, beanNameViewResolver, mvcViewResolver] #ConditionalOnMissingBean (names: viewResolver; types: org.springframework.web.servlet.view.ContentNegotiatingViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter.FaviconConfiguration matched
- matched (OnPropertyCondition)
WebSocketAutoConfiguration matched
- #ConditionalOnClass classes found: javax.servlet.Servlet,javax.websocket.server.ServerContainer (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
WebSocketAutoConfiguration.TomcatWebSocketConfiguration matched
- #ConditionalOnClass classes found: org.apache.catalina.startup.Tomcat,org.apache.tomcat.websocket.server.WsSci (OnClassCondition)
WebSocketAutoConfiguration.TomcatWebSocketConfiguration#websocketContainerCustomizer matched
- Required JVM version 1.7 or newer found 1.8 (OnJavaCondition)
- #ConditionalOnMissingBean (names: websocketContainerCustomizer; SearchStrategy: all) found no beans (OnBeanCondition)
-----CUTTED_TEXT----8<
2016-08-16 06:14:47.958 INFO 2531 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-08-16 06:14:47.964 INFO 2531 --- [ main] com.sehatigroup.SiaApplication : Started SiaApplication in 6.015 seconds (JVM running for 6.797)
Thank you
It looks as though you haven't created a JdbcTemplate bean in any configuration class, so spring doesn't know what to inject into your JdbcTemplate when your application starts up.
Here's one example which shows how to set your JdbcTemplate from a datasource bean in your spring configuration: http://www.concretepage.com/spring/jdbc-template-spring-jdbc-integration-example