How to populate the springboot yml attribute value into the xml file

clipboard.png

clipboard.png

clipboard.png

the picture shows no replacement

Mar.30,2021

1. Why does spring have its own configuration file for defining xml after integrating Dubbo? You can directly define the Config class of dubbo, which reads the configuration of yml
2 by default. If you really want to read the property configuration of yml in xml, you can learn about the configuration of springProfile similar to springProperty, that uses them to configure logback.xml

. The

< springProfile > tag allows us to be more flexible with configuration files, optionally including or excluding configuration parts. The outline part is supported anywhere in the element. Use this name property to specify which profile accepts the configuration. You can specify multiple profiles using a comma-separated list.

<springProfile name="dev">
    <!--  -->
</springProfile>

<springProfile name="dev,test">
    <!-- -->
</springProfile>
< H2 > springProperty < / H2 >

1. This < springProperty > tag allows us to display attributes from Spring, Environment for use in Logback. This is very useful if you want application.properties to access the values in the file in the read-back configuration.

2. The tag works similar to the standard < property > tag of Logback, but is not specified directly by value specifying the source attribute (from Environment). Scope can use this property if you need to store it in a location outside the scope of the local. If you need a fallback value in case the property is not set, Environment can use the defaultValue property.

and so on.
reference: logback reads yml configuration

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e458c2-44b50.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e458c2-44b50.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?