Jelajahi Sumber

fix again with db config

zhiqiang.yu 4 minggu lalu
induk
melakukan
d3cfaa1b7c

+ 3 - 2
poyi-app/src/main/java/com/tzy/config/AppCommonConfig.java

@@ -3,6 +3,7 @@ package com.tzy.config;
 import com.impossibl.postgres.jdbc.PGConnectionPoolDataSource;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
 
 import javax.sql.PooledConnection;
 import java.sql.SQLException;
@@ -13,7 +14,7 @@ import java.sql.SQLException;
  * @Description TODO
  * @Date 2021/12/16 14:05
  */
-//@Configuration
+@Configuration
 public class AppCommonConfig {
 
 	@Value("${spring.datasource.druid.master.url}")
@@ -90,4 +91,4 @@ public class AppCommonConfig {
 	//	// ConnectionPool实现了ConnectionFactory接口,使用ConnectionFactory替换ConnectionFactory
 	//	return new ConnectionPool(configuration);
 	//}
-}
+}

+ 2 - 2
poyi-app/src/main/resources/application.yml

@@ -104,9 +104,9 @@ spring:
     druid:
       # 主库数据源
       master:
+        url: jdbc:postgresql://192.168.50.8:5432/ahx_app
         username: postgres
         password: 123456
-        url: jdbc:postgresql://192.168.50.8:5432/ahx_app
       # 初始连接数
       initialSize: 5
       # 最小连接池数量
@@ -333,4 +333,4 @@ forumServer:
   baseUrl: http://community
 
 mallServer:
-  baseUrl: http://poyee-mall
+  baseUrl: http://poyee-mall