When using springboot’s @Autowired injection, a red wavy line appears. The interface after Alt + enter is as follows
The solution is: add (required = false
) after @Autowired, and the red wavy line will disappear
@Autowired(required = false)
Read More:
- How to Solve IDEA @Autowired Error
- How to Solve IDEA Error: Command line is too long
- [Solved] ssm Error: Error creating bean with name ‘employeeController’: Injection of autowired dependencies failed
- How to Solve error creating bean with name when springboot starts
- Annotation @resource & @Autowired introduces Spring bean error
- Project Startup Error: Error running ‘xxxApplication‘;Command line is too long, Shoerten command line for……..
- How to Solve EasyExcel3.0.5 Version Error
- How to Solve Springboot configurate environment file Error
- How to Solve Springboot use thymeleaf template error
- How to Solve mybatis-plus Paging Plug-in PaginationInnerInterceptor error
- [Solved] Command line is too long. Shorten command line for XXXXXXXTest.rmLogRecordOver Error running
- How to Solve ERROR: Java 1.7 or later is required to run Apache Drill
- [Solved] Error running ‘ServiceStarter’: Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration
- How to Solve Error: Maven ‘parent.relativePath‘ of POM…
- How to Solve Image Upload Error: Uncaught (in promise) DOMException: Failed to execute ‘put‘ on ‘IDBObjectStore‘
- How to Solve Swagger error: typeerror: failed to fetch
- How to Solve Mybatis error: invalid bound statement (not found)
- [Solved] IDEA Start Project Error: Error running ‘xxxxxx‘: Command line is too long. Shorten command line for …..
- How to Solve Nosuchmethoderror Error
- [Solved] error running ‘xx‘ Command line is too long shorten command line for xx or also for Spring Boot defa