Intelligent idea uses @resource or @autowire to report an error, and a red wavy line appears
Although it doesn’t affect the use, it looks very uncomfortable, so the solution is as follows:
Error message:
Could not autowire. No beans of '' type found. less... (Ctrl+F1) Checks autowiring problems in a bean class.
Solution:
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class removed
Similar Posts:
- Quartz Error: qrtz_locks doesn’t exist [How to Solve]
- [Solved] springboot Startup Error: Bean with name ‘xxxxService‘ has been injected into other beans
- Springcloud: gateway module startup error
- [Solved] Springboot Use Redis Error: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘redisTemplate’ defined in class path resource
- factory.NoSuchBeanDefinitionException: No qualifying bean of type
- Solution to the prompt “could not autowire. No beans of ‘XXXX’ type found” in IntelliJ idea
- [Solved] ShardingJDBC Error: The bean ‘dataSource’, defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class], could not be registered.
- Unit test reports an error nosuchbeandefinitionexception
- Context initialization failed — solution
- Cannot resolve reference to bean ‘entityManagerFactory’ while setting constructor argument