Springboot Learning Problems (1)-Configuration files have log debug mode and other configuration items, why not work

Source: Internet
Author: User

This problem bothered me for almost two days, by looking for n more information to finally solve, write down to share to everyone.

Logging.level.root=debug

...

A series of log configuration entries does not work because Springboot boot does not load configuration files under Src/main/resources application.properties or APPLICATION.YML.

I find n more information on the Internet, on various sites, like what Blog Park, CSDN, Stack overflow and so on, I once thought is my dependence is missing, add all kinds of dependence, and exclude all kinds of dependence. But found useless.

I used to think it was my springboot version too High (1.5.3.RELEASE), reduced version. However, there is no.

I used to think it was my profile. Perhaps the configuration item is misspelled, a letter confirming it, and viewing n multiple times. However, there is no.

Finally, when I have to give up, it solves the problem and discovers that it is a reason to cry. I put the resources folder on the main sibling.

Spring will look up from the directory under Classpath or /config the root directory of Classpath application.properties orapplication.yml! 而我的classpath中,没有src/main/resources这个目录。 classpath中有 target/classes 这个目录,正是这个目录缺少我的配置文件,所以一直加载失败。

 

Springboot Learning Problems (1)-Configuration files have log debug mode and other configuration items, why not work

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.