I had this same issue when creating a Spring Boot application using their @SpringBootApplication
annotation. This annotation represents @Configuration
, @EnableAutoConfiguration
and @ComponentScan
according to the spring reference.
As expected, the new annotation worked properly and my application ran smoothly but, Intellij kept complaining about unfulfilled @Autowire
dependencies. As soon as I changed back to using @Configuration
, @EnableAutoConfiguration
and @ComponentScan
separately, the errors ceased. It seems Intellij 14.0.3 (and most likely, earlier versions too) is not yet configured to recognise the @SpringBootApplication
annotation.
For now, if the errors disturb you that much, then revert back to those three separate annotations. Otherwise, ignore Intellij…your dependency resolution is correctly configured, since your test passes.
Always remember…
Man is always greater than machine.
Related Posts:
- @Autowired – No qualifying bean of type found for dependency
- Understanding Spring @Autowired usage
- Only using @JsonIgnore during serialization, but not deserialization
- JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object
- When do you use Java’s @Override annotation and why?
- com.atomikos.icatch.SysException: Error in init: Log already in use? tmlog in ./
- Spring @PropertySources value not overriding
- Lombok and Maven
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- “NoClassDefFoundError: Could not initialize class” error
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘MyController’:
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- Error: Could not find or load main class in intelliJ IDE
- No String-argument constructor/factory method to deserialize from String value (”)
- Spring boot – Request method ‘POST’ not supported. Tried everything
- “NoClassDefFoundError: Could not initialize class” error
- “NoClassDefFoundError: Could not initialize class” error
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?
- Difference between spring @Controller and @RestController annotation
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- unused import statement for used ones in IntelliJ IDEA
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- com.sun.jdi.InvocationException occurred invoking method
- Error: JavaFX runtime components are missing, and are required to run this application with JDK 11
- UnsatisfiedDependencyException: Error creating bean with name
- UnsatisfiedDependencyException: Error creating bean with name
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- How to fix “unsupported class file major version 60” in IntelliJ?
- Why SpringMVC Request method ‘GET’ not supported?
- Could not resolve placeholder in string value
- JAVA_HOME should point to a JDK not a JRE
- Is spring default scope singleton or not?
- IDEA: javac: source release 1.7 requires target release 1.7
- Meaning of @Resource annotation
- IntelliJ – Can’t start – “JAVA_HOME does not point to a valid JVM installation”
- How to solve the “failed to lazily initialize a collection of role” Hibernate exception
- MultipartException: Current request is not a multipart request
- Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
- Error: Module not specified (IntelliJ IDEA)
- Invalid signature file digest for Manifest main attributes exception while trying to run jar file
- Configure active profile in SpringBoot via Maven
- Downloading a file from spring controllers
- “Cannot start compilation: the output path is not specified for module…”
- intellij idea – Error: java: invalid source release 1.9
- String index out of bounds exception java
- java.lang.IllegalStateException: Failed to introspect Class
- Spring boot: Unable to start embedded Tomcat servlet container
- when spring boot startup,throw out the “method names must be tokens” exception
- model.addAttribute() parameters
- Class JavaLaunchHelper is implemented in two places
- IntelliJ IDEA “The selected directory is not a valid home for JDK”
- What is the best way to implement constants in Java?
- What is the reason behind “non-static method cannot be referenced from a static context”?
- What does ” || ” mean in Java? [duplicate]
- “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G
- “int cannot be dereferenced” in Java
- What is a Key-Value Pair?
- What is a serialVersionUID and why should I use it?
- SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”
- The difference between += and =+
- exception in initializer error in java when using Netbeans
- Understanding the difference between null and ‘\u000’ in Java
- what does Dead Code mean under Eclipse IDE Problems Section
- Java compressing Strings
- Can an abstract class have a constructor?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Generate a random double in a range
- Eclipse “Error: Could not find or load main class”
- How to get locator of current web element?
- javax.naming.NameNotFoundException
- How to print out all the elements of a List in Java?
- If Java is Strongly typed then why does this code compile?
- keytool error Keystore was tampered with, or password was incorrect
- How to override toString() properly in Java?
- Returning null in a method whose signature says return int?
- keytool error Keystore was tampered with, or password was incorrect
- Java TreeMap Comparator
- What is the use of System.in.read()?
- Invalid escape sequence (valid ones are \b \t \n \f \r \” \’ \\ )
- JDK was not found on the computer for NetBeans 6.5
- In Java, how to assign the variable number=Integer.parseInt(args[0]) a value if no argument is passed?
- How are “mvn clean package” and “mvn clean install” different?
- Why are two empty ArrayLists with different generic types equal?
- java.lang.VerifyError: Inconsistent stackmap frames at branch target 421
- Sending POST data in Android
- When is “java.io.IOException:Connection reset by peer” thrown?
- Java ArrayList of Doubles
- what is update-alternatives command in linux and what is the use of it?
- java: use StringBuilder to insert at the beginning
- Multiple delimiters in Scanner class of Java
- Eclipse Problems View not showing Errors anymore
- unexpected type error
- What does it mean: The serializable class does not declare a static final serialVersionUID field? [duplicate]
- android.content.res.Resources$NotFoundException: String resource ID #0x0
- what does x– or x++ do here?
- Java “lambda expressions not supported at this language level”
- How to specify filepath in java?
- Issue installing Netbeans in Windows 10: Java SE Development Kit (JDK) was not found on this computer