Spring Annotated mode idea could not autowire,eclipse but no problem

Source: Internet
Author: User

Workaround 1:

Fundamentally solve the problem:

File-project Structure page Facets Delete Spring (directly right-click Delete)

The answer is right. does not reduce security!!
Because when you create a project, you create an empty project and then create a Web Moduele (you want to create Web project directly), and you typically don't use spring components. are configured on their own.
At this time if you are careless hand slip (hand slip reason: Because the idea of your spring configuration file will be on the top of the warning, and then you a fix, it is easy to trouble), then the error will not autowired.
So all you have to do is erase your hand and add it.

http://www.oschina.net/question/202626_181237

Workaround 2:

Reduce the level of autowired detection, do not prompt on OK

Tellij idea @Autowired Cancellation tips
Spring Bean is injected through @autowired, Spring Auto Scan configuration, in the case of editing, cannot find the corresponding bean, so the hint can not find the corresponding bean error.
However, the build project works correctly.

Available in file--Settings--inspections. Use the search function to find the autowired for Bean Class,

Change the level of severity from previous error to warning or other level that can be ignored.

http://blog.csdn.net/qq853447917/article/details/50460374

Spring Annotated mode idea could not autowire,eclipse but no problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.