Spring

Spring Autowire Use @Component, @Repository, @Service and @Controller Annotations

Besides define Spring beans in configuration file, Spring also provide some java annotation interface for you to make Spring bean declaration simple and easy. These interfaces are also called stereotype annotation. They are @Component, @Repository, @Service and @Controller. If you want to reference such a bean, you just need to annotate that field with @Autowired …

Spring Autowire Use @Component, @Repository, @Service and @Controller Annotations Read More »

Spring Application Start Throw BeanDefinitionStoreException

When your Spring application startup, you may sometimes encounter such exceptions. org.springframework.beans.factory.BeanDefinitionStoreException. And the error message maybe like below.  Failed to read candidate component class: file nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file – probably due to a new Java class file version that isn’t supported yet: nested exception is java.lang.IllegalArgumentException …

Spring Application Start Throw BeanDefinitionStoreException Read More »