Springboot cannot find class exception resolution

Source: Internet
Author: User

Springboot class exception resolution not found

Problem Description: The project is a maven+springboot project, running normally in eclipse, no problem, but when you edit with idea can not start at all, error a lot of, such as can't find HttpServletRequest class, No hibernate classes were found, and the Tomcat initialization class was not found, and so the exotic problems. specifically see below:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/4E/wKioL1gtLrWw26acAATdXhFHqic261.jpg-wh_500x0-wm_3 -wmp_4-s_2245303225.jpg "title=" 07.jpg "alt=" Wkiol1gtlrww26acaatdxhfhqic261.jpg-wh_50 "/>

Solved for a long time did not find the reason, online search a lot of did not really solve the problem.

inadvertently see a blog post, said the problem, a moment suddenly dawned, this is not dependent on the wrong, is the difference between the compiler, this may be an idea of a bug, when using Spring-boot, if the introduction of a dependency set to provided, The corresponding class will not be found when the IntelliJ is started. Therefore, this configuration is required at this time (<scope>provided</scope >) take it off and then it's OK. It turns out that it is OK to pack without adding the provided attribute. For a long time, alas, record it. Share with June.


Springboot cannot find class exception resolution

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.