The method of using other configuration information when java boot project yml defines configuration

The method of using the content of the configuration file in the class is described in our java boot project to read the yml configuration information

So how does the configuration in the configuration file use other configuration information?
For example, we write like this
insert image description hereso that our fieUrl is a public address
and part of our userfieUrl is fieUrl

We can write the reference code as follows

fieUrl: D:\\学习案例
userfieUrl: ${
    
    fieUrl}\\vue教学

simply say

${
    
    属性名}

Just write this directly in the configuration file

Then let's verify the effect
and output it according to the previous method. There is no problem insert image description here
when we access the port .
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/131031756