build: 调整properties的优先级

This commit is contained in:
CaptainB 2021-12-24 12:54:02 +08:00 committed by 刘瑞斌
parent 7d39a9228b
commit aec1395ea8
3 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,10 @@ import org.springframework.scheduling.annotation.EnableScheduling;
JmeterProperties.class
})
@EnableScheduling
@PropertySource(value = {"file:/opt/metersphere/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true)
@PropertySource(value = {
"classpath:/base.properties",
"file:/opt/metersphere/conf/metersphere.properties",
}, encoding = "UTF-8", ignoreResourceNotFound = true)
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">
<property resource="application.properties"/>
<property resource="base.properties"/>
<property file="/opt/metersphere/conf/metersphere.properties"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>