EnableAutoConfiguration注解的工作原理(org.springframework.boot.autoconfigure.EnableAutoConfiguration=core.bean.MyConfig) https://www.jianshu.com/p/464d04c36fb1…
一.@Enable* 启用某个特性的注解 1.EnableConfigurationProperties 回顾属性装配 application.properties中添加 tomcat.host=192.168.2.1 tomcat.port=8080 增加属性类TomcatProperties package com.lhx.spring.springboot_enable; import org.springframework.boot.context.properties.Configur…
使用注解实现异步 RunnableDemo类 package com.boot.enable.bootenable; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; import java.util.concurrent.TimeUnit; @Component public class RunnableDemo implements…
问题描述: 在使用springaop对目标对象增强时,若切点的条件过于宽泛就会出现以下异常! 如: @Before("execution(* *(..))") @Before("args(..)") @Before("within(org..*)") ... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spr…
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the cl…
springboot +gradle 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer 经过一步步查看删选是因为spring-data-jpa包的版本冲突导致. 解决方案: 修改gradle的build.gradle配置文件 a.添加plugin("org.springfram…
SpringBoot 单元测试报错 @RunWith(SpringRunner.class) @SpringBootTest public class ProductCategoryRepositoryTest { @Autowired private ProductCategoryRepository repository; @Test public void findOneTest(){ ProductCategory one = repository.findOne(1); Assert.…
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-07-16 14:55:18.498 ERROR 8880 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED T…
import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes→org.springframework.boot.web.servlet.error.DefaultErrorAttributes import org.springframework.boot.autoconfigure.web.ErrorAttributes;→org.springframework.boot.web.servlet.error.E…
出自:http://blog.csdn.net/qq_26525215 @EnableAspectJAutoProxy @EnableAspectJAutoProxy注解 激活Aspect自动代理 <aop:aspectj-autoproxy/> 开启对AspectJ自动代理的支持. 在用到AOP的自动代理的时候用,如果你理解了Java的动态代理,很容易的就会熟悉AOP的自动代理的. @EnableAsync @EnableAsync注解开启异步方法的支持. 这个相信大家都比较熟悉的.对于异步…