发布于 2021-12-31 | Comments 解决方案 加上TestPropertySource注解,然后将之前@value映射的路径,写在properties中就可以了 参考 Populating Spring @Value during Unit Test