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 does Java option -Xmx stand for? [duplicate]
- How do I convert a String to an int in Java?
- What does Java option -Xmx stand for? [duplicate]
- Is there an invisible character that is not regarded as whitespace?
- Problem with gif with transparent background
- Finding white rectangle in an image
- 1000 * 60 * 60 * 24 * 30 results in a negative number [duplicate]
- How to convert nanoseconds to seconds using the TimeUnit enum?
- Search for words with telephone numbers from 2-3-4 tree
- Using or ‘|’ in regex [duplicate]
- How to format strings in Java
- What is the difference between x86 and x64
- && (AND) and || (OR) in IF statements
- How to use the toString method in Java?
- What is a NullPointerException, and how do I fix it?
- What exactly is Apache Camel?
- Unable to find valid certification path to requested target – error even after cert imported
- Unable to find valid certification path to requested target – error even after cert imported
- What is the equivalent of the C++ Pair
in Java? - Java – Convert integer to string [duplicate]
- Getting random numbers in Java [duplicate]
- What is an instance variable in Java?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- Java: “error: cannot find symbol”
- How does the Java ‘for each’ loop work?
- What is a StackOverflowError?
- How to uninstall Eclipse?
- Is GNU’s Java Compiler (GCJ) dead? [closed]
- How does System.out.print() work?
- How do I “decompile” Java class files? [closed]
- How do I determine whether an array contains a particular value in Java?
- How to initialize an array in Java?
- How does the Java ‘for each’ loop work?
- Java 8 Iterable.forEach() vs foreach loop
- Initialize part of an array in java
- How can I solve Exception in thread “main” java.lang.NullPointerException error [duplicate]
- How to split a string in Java
- What does “Could not find or load main class” mean?
- What does “Could not find or load main class” mean?
- Why am I getting a NoClassDefFoundError in Java?
- How to avoid “ConcurrentModificationException” while removing elements from `ArrayList` while iterating it? [duplicate]
- Eclipse/Maven error: “No compiler is provided in this environment”
- How do I compare strings in Java?
- What is reflection and why is it useful?
- Implementing UML diagram to Java [closed]
- How to round a number to n decimal places in Java