reghao 2 лет назад
Родитель
Сommit
00e29c059b

+ 2 - 1
.gitignore

@@ -2,4 +2,5 @@
 *target*/
 *logs*/
 *.jar
-*.iml
+*.iml
+console.log

+ 0 - 15
oss-store/bin/application-test.yml

@@ -1,15 +0,0 @@
-server:
-  tomcat:
-    basedir: /opt/tmp/tomcat
-dubbo:
-  registry:
-    address: zookeeper://192.168.0.110:2181
-spring:
-  datasource:
-    url: jdbc:mysql://192.168.0.110:3306/reghao_oss_tdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
-    username: test
-    password: Test@123456
-oss:
-  domain: oss.reghao.cn
-  diskDirs:
-    - /opt/oss/disk/13f654c8-af87-4710-aac9-7aa086c99aec/

+ 0 - 0
oss-store/bin/application-dev.yml → oss-store/bin/oss.yml


+ 2 - 2
oss-store/bin/start.sh

@@ -2,5 +2,5 @@
 
 app_dir=`pwd`
 app_name='oss-store.jar'
-# 使用 mvn clean package -Dmaven.test.skip -Ptest 生成的 jar 运行时加载 application.yml 和 application-test.yml 两个配置文件, 分别位于 classpath 和文件系统路径
-java -jar ${app_dir}"/"${app_name} --spring.config.location=classpath:/application.yml,file:${app_dir}/application-test.yml > console.log 2>&1 &
+# 使用 mvn clean package -Dmaven.test.skip 生成的 jar 运行时加载 application.yml 和 oss.yml 两个配置文件, 分别位于 classpath 和文件系统路径
+java -jar ${app_dir}"/"${app_name} --spring.config.location=classpath:/application.yml,file:${app_dir}/oss.yml > console.log 2>&1 &

+ 0 - 25
oss-store/pom.xml

@@ -158,30 +158,6 @@
         </dependency>
     </dependencies>
 
-    <profiles>
-        <profile>
-            <id>dev</id>
-            <properties>
-                <profile.active>dev</profile.active>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profile.active>test</profile.active>
-            </properties>
-        </profile>
-        <profile>
-            <id>prod</id>
-            <properties>
-                <profile.active>prod</profile.active>
-            </properties>
-        </profile>
-    </profiles>
-
     <build>
         <finalName>oss-store</finalName>
         <resources>
@@ -190,7 +166,6 @@
                 <filtering>true</filtering>
                 <includes>
                     <include>application.yml</include>
-                    <include>application-${profile.active}.yml</include>
                     <include>mapper/**</include>
                     <include>*.xml</include>
                 </includes>

+ 0 - 2
oss-store/src/main/resources/application.yml

@@ -18,8 +18,6 @@ spring:
       max-file-size: 20GB
   application:
     name: oss-store
-  profiles:
-    active: @profile.active@
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.zaxxer.hikari.HikariDataSource

+ 5 - 17
oss-store/src/main/resources/logback-spring.xml

@@ -48,21 +48,9 @@
         </rollingPolicy>
     </appender>
 
-    <springProfile name="dev">
-        <root level="info">
-            <appender-ref ref="consoleLog"></appender-ref>
-        </root>
-    </springProfile>
-    <springProfile name="test">
-        <root level="info">
-            <appender-ref ref="fileInfoLog"></appender-ref>
-            <appender-ref ref="fileErrorLog"></appender-ref>
-        </root>
-    </springProfile>
-    <springProfile name="prod">
-        <root level="info">
-            <appender-ref ref="fileInfoLog"></appender-ref>
-            <appender-ref ref="fileErrorLog"></appender-ref>
-        </root>
-    </springProfile>
+    <root level="info">
+        <!--<appender-ref ref="consoleLog"></appender-ref>-->
+        <appender-ref ref="fileInfoLog"></appender-ref>
+        <appender-ref ref="fileErrorLog"></appender-ref>
+    </root>
 </configuration>