@Value读取不到配置文件的值

将根目录的pom.xml中

<packaging>jar</packaging>

由pom更改为jar.重新install就可以在target看到配置文件并且读取到了
原文地址:https://www.cnblogs.com/duanzq/p/14969514.html