SpringBoot项目遇到AopAutoConfiguration matched: - @ConditionalOnProperty (spring.aop.auto=true)错误

启动Spring boot项目的时候,出现如下错误:

CONDITIONS EVALUATION REPORT

Positive matches:

AopAutoConfiguration matched:
- @ConditionalOnProperty (spring.aop.auto=true) matched (OnPropertyCondition)

AopAutoConfiguration.AspectJAutoProxyingConfiguration matched:
- @ConditionalOnClass found required class ‘org.aspectj.weaver.Advice’ (OnClassCondition)

AopAutoConfiguration.AspectJAutoProxyingConfiguration.CglibAutoProxyConfiguration matched:
- @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)

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)

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 primary bean from beans ‘dataSource’ (OnBeanCondition)

DispatcherServletAutoConfiguration matched:
- @ConditionalOnClass found required class ‘org.springframework.web.servlet.DispatcherServlet’ (OnClassCondition)
- found ‘session’ scope (OnWebApplicationCondition)

DispatcherServletAutoConfiguration.DispatcherServletConfiguration matched:
- @ConditionalOnClass found required class ‘javax.servlet.ServletRegistration’ (OnClassCondition)
- Default DispatcherServlet did not find dispatcher servlet beans (DispatcherServletAutoConfiguration.DefaultDispatcherServletCondition)

DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration matched:
- @ConditionalOnClass found required class ‘javax.servlet.ServletRegistration’ (OnClassCondition)
- DispatcherServlet Registration did not find servlet registration bean (DispatcherServletAutoConfiguration.DispatcherServletRegistrationCondition)

DispatcherServletAutoConfiguration.DispatcherServletRegistrationConfiguration#dispatcherServletRegistration matched:
- @ConditionalOnBean (names: dispatcherServlet types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found bean ‘dispatcherServlet’ (OnBeanCondition)

EmbeddedWebServerFactoryCustomizerAutoConfiguration matched:
- @ConditionalOnWebApplication (required) found ‘session’ scope (OnWebApplicationCondition)

EmbeddedWebServerFactoryCustomizerAutoConfiguration.TomcatWebServerFactoryCustomizerConfiguration matched:
- @ConditionalOnClass found required classes ‘org.apache.catalina.startup.Tomcat’, ‘org.apache.coyote.UpgradeProtocol’ (OnClassCondition)

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.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver matched:
- @ConditionalOnBean (types: org.springframework.web.servlet.DispatcherServlet; SearchStrategy: all) found bean ‘dispatcherServlet’; @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver; SearchStrategy: all) 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)

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 primary bean from beans ‘dataSource’ (OnBeanCondition)

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)

JdbcTemplateAutoConfiguration matched:
- @ConditionalOnClass found required classes ‘javax.sql.DataSource’, ‘org.springframework.jdbc.core.JdbcTemplate’ (OnClassCondition)
- @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) found a primary bean from beans ‘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)

原因:忘了添加扫描Dao层的路径了。所以如果你是Service层,就在该实现类的上面填上注解:@Service 即可。

  • 7
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小吴同学GOGOGO

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值