13693261870
2025-07-07 14e6a1798e2c84ad40b5e15a344823e35895ebc6
修改登录页面和Swagger
已修改12个文件
已删除1个文件
427 ■■■■ 文件已修改
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/java/com/terra/system/config/PropertiesConfig.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/java/com/terra/system/config/SwaggerConfig.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/java/com/terra/system/config/WebConfig.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/java/com/terra/system/controller/all/SignController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/application-test.yml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/static/html/login.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/templates/druid.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/templates/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/templates/login.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/templates/login_old.html 368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-system/src/main/resources/templates/monitor.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -23,7 +23,7 @@
        <tobato.version>1.27.2</tobato.version>
        <kaptcha.version>2.3.3</kaptcha.version>
        <pagehelper.boot.version>2.0.0</pagehelper.boot.version>
        <druid.version>1.2.23</druid.version>
<!--        <druid.version>1.2.23</druid.version>-->
        <dynamic-ds.version>4.3.1</dynamic-ds.version>
        <commons.io.version>2.19.0</commons.io.version>
        <velocity.version>2.3</velocity.version>
se-system/pom.xml
@@ -43,6 +43,13 @@
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!--thymeleaf-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
<!--            <version>2.2.2.RELEASE</version>-->
        </dependency>
        <!--lombok-->
        <dependency>
            <groupId>org.projectlombok</groupId>
@@ -144,7 +151,14 @@
        <dependency>
            <groupId>com.github.oshi</groupId>
            <artifactId>oshi-core</artifactId>
            <version>4.4.2</version>
            <version>6.8.0</version>
        </dependency>
        <!--hutool-->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.7.20</version>
        </dependency>
        <!--commons-fileupload-->
se-system/src/main/java/com/terra/system/config/PropertiesConfig.java
@@ -19,10 +19,10 @@
    @Value("${sys.path.temp}")
    private String tempPath;
    // @Value("${spring.datasource.druid.stat-view-servlet.login-username}")
    @Value("${spring.datasource.druid.stat-view-servlet.login-username}")
    private String druidUser;
    // @Value("${spring.datasource.druid.stat-view-servlet.login-password}")
    @Value("${spring.datasource.druid.stat-view-servlet.login-password}")
    private String druidPwd;
    @Value("${sys.tile_path}")
se-system/src/main/java/com/terra/system/config/SwaggerConfig.java
@@ -2,6 +2,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
@@ -11,6 +12,7 @@
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@@ -21,6 +23,9 @@
@Configuration
@EnableSwagger2
public class SwaggerConfig {
    @Resource
    Environment env;
    private List<ApiKey> securitySchemes() {
        List<ApiKey> apiKeys = new ArrayList<ApiKey>();
        apiKeys.add(new ApiKey("Authorization", "token", "header"));
@@ -49,8 +54,13 @@
    @Bean
    public Docket createRestApi() {
        String swaggerEnable = env.getProperty("sys.swaggerEnable");
        boolean enable = "true".equals(swaggerEnable);
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo()).select()
                .enable(enable)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.terra.system.controller"))
                //.securitySchemes(securitySchemes())
                //.securityContexts(securityContexts())
se-system/src/main/java/com/terra/system/config/WebConfig.java
@@ -13,6 +13,7 @@
import org.springframework.web.servlet.config.annotation.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
@@ -104,7 +105,7 @@
        //SerializerFeature.PrettyFormat);
        converter.setFastJsonConfig(config);
        converter.setDefaultCharset(Charset.forName("UTF-8"));
        converter.setDefaultCharset(StandardCharsets.UTF_8);
        converters.add(converter);
    }
}
se-system/src/main/java/com/terra/system/controller/all/SignController.java
@@ -65,7 +65,7 @@
        UserEntity ue = tokenService.getCurrentUser(req);
        if (ue != null) {
            mv.addObject("msg", "Hello " + ue.getUname() + " !");
            mv.addObject("msg", "Hello," + ue.getUname() + " ï¼");
        }
        return mv;
se-system/src/main/resources/application-test.yml
@@ -9,6 +9,8 @@
    context-path: /
spring:
  application:
    name: se-system
  # redis
  redis:
    database: 0
@@ -122,6 +124,8 @@
# ç³»ç»Ÿé…ç½®
sys:
  # å¯ç”¨swagger
  swaggerEnable: true
  # è‡ªåŠ¨æŸ¥è¯¢
  autoQuery: 0
  # ç®¡ç†å‘˜ID
@@ -151,4 +155,4 @@
    exePath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/Bin/MxCAD/Release/mxcadassembly.exe
    targetPath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/SRC/TsWeb/public/data
  # ä¸Šä¼ é™„件表
  attachTabs: bd.b_pac_hydrogeology,bd.b_pac_frozensoil,bd.b_pac_geologic_hazard,bd.b_pac_marine_meteorological,bd.b_pac_meteorological,bs.m_equipment_nameplate,bs.m_hydraulic_protection,bs.m_marker,bs.s_explorationpoint,bs.u_sectionline
  attachTabs: bd.b_pac_hydrogeology,bd.b_pac_frozensoil
se-system/src/main/resources/static/html/login.html
@@ -1,7 +1,7 @@
<!DOCTYPE>
<html>
<head>
  <title>管道基础大数据平台服务-登录</title>
  <title>系统服务-登录</title>
  <meta http-equiv="Expires" content="0" />
  <meta http-equiv="Cache" content="no-cache" />
  <meta http-equiv="Pragma" content="no-cache" />
se-system/src/main/resources/templates/druid.html
@@ -2,7 +2,7 @@
<html>
<head>
  <meta charset="UTF-8">
  <title>管道基础大数据平台服务-数据库监控</title>
  <title>系统服务-数据库监控</title>
  <script>
    location.href = "../druid/index.html";
  </script>
se-system/src/main/resources/templates/index.html
@@ -2,7 +2,7 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <meta charset="UTF-8">
  <title>管道基础大数据平台服务-首页</title>
  <title>系统服务-首页</title>
  <script src="../js/jquery.min.js"></script>
  <script>
    window.onload = function () {
se-system/src/main/resources/templates/login.html
@@ -1,7 +1,7 @@
<!DOCTYPE>
<html>
<head>
  <title>管道基础大数据平台服务-登录</title>
  <title>系统服务-登录</title>
  <meta http-equiv="Expires" content="0" />
  <meta http-equiv="Cache" content="no-cache" />
  <meta http-equiv="Pragma" content="no-cache" />
@@ -62,9 +62,9 @@
    </form>
  </div>
  <div class="title">
  <!--<div class="title">
    <img src="../images/login/lg_03.png" alt=""/>
  </div>
  </div>-->
  <script src='../js/earth/dat.gui.min.js'></script>
  <script src='../js/earth/Stats.js'></script>
se-system/src/main/resources/templates/login_old.html
ÎļþÒÑɾ³ý
se-system/src/main/resources/templates/monitor.html
@@ -4,7 +4,7 @@
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>运维监控</title>
  <title>系统服务-运维监控</title>
  <link rel="stylesheet" href="./css/main/main1.css">
  <link rel="stylesheet" href="./css/main/jquery-ui.min.css">