From 52bc04f7252eced2642cf6cd8a40c90f01f50f44 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 30 Apr 2020 16:28:15 +0800 Subject: [PATCH] properties location changed --- backend/src/main/java/io/metersphere/Application.java | 2 ++ backend/src/main/java/io/metersphere/config/MybatisConfig.java | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/Application.java b/backend/src/main/java/io/metersphere/Application.java index 2527f95107..730b148045 100644 --- a/backend/src/main/java/io/metersphere/Application.java +++ b/backend/src/main/java/io/metersphere/Application.java @@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.ServletComponentScan; +import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = {QuartzAutoConfiguration.class}) @ServletComponentScan @@ -14,6 +15,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; KafkaProperties.class, JmeterProperties.class }) +@PropertySource(value = {"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); diff --git a/backend/src/main/java/io/metersphere/config/MybatisConfig.java b/backend/src/main/java/io/metersphere/config/MybatisConfig.java index b881f98eca..dc7e90967d 100644 --- a/backend/src/main/java/io/metersphere/config/MybatisConfig.java +++ b/backend/src/main/java/io/metersphere/config/MybatisConfig.java @@ -7,7 +7,6 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; import org.springframework.transaction.annotation.EnableTransactionManagement; import java.util.ArrayList; @@ -17,7 +16,6 @@ import java.util.Properties; @Configuration @MapperScan(basePackages = "io.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory") @EnableTransactionManagement -@PropertySource(value = {"file:/opt/fit2cloud/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true) public class MybatisConfig { @Bean