月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2024-03-04 7c52b18f9ca518424e1bae4451b553daca882ed5
修改初始化
已修改2个文件
10 ■■■■■ 文件已修改
src/main/java/com/moon/server/config/InitConfig.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/moon/server/config/InitConfig.java
@@ -8,6 +8,7 @@
import com.moon.server.helper.PathHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.env.Environment;
@@ -35,6 +36,12 @@
    @Resource
    TestService testService;
    @Value("${server.port}")
    String serverPort;
    @Value("${server.servlet.context-path}")
    String contextPath;
    @Override
    public void run(ApplicationArguments args) {
        // noinspection AlibabaRemoveCommentedCode
@@ -49,6 +56,7 @@
            argsService.initSettingData();
            log.info("***************** 系统启动完毕 *****************" + "\n");
            log.info("API文档:http://localhost:" + serverPort + contextPath + "/swagger-ui.html");
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
        }
src/main/resources/application.yml
@@ -47,7 +47,7 @@
    name: prod
    # JDBC 基本配置 &currentSchema=public
    #url: jdbc:postgresql://127.0.0.1:5433/moon?useAffectedRows=true
    url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true
    url: jdbc:postgresql://192.168.11.204:5433/moon?useAffectedRows=true
    #url: jdbc:postgresql://103.85.165.99:25432/moon?useAffectedRows=true
    username: postgres
    #password: postgres