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