fanxw 5 dni temu
rodzic
commit
250fd20769

+ 4 - 0
pom.xml

@@ -49,6 +49,10 @@
49 49
             <groupId>org.springframework.cloud</groupId>
50 50
             <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
51 51
         </dependency>
52
+        <dependency>  
53
+		    <groupId>org.springframework.boot</groupId>  
54
+		    <artifactId>spring-boot-starter-security</artifactId>  
55
+		</dependency>
52 56
 
53 57
         <dependency>
54 58
             <groupId>org.apache.commons</groupId>

+ 24 - 0
src/main/java/com/chinaitop/depot/WebSecurityConfig.java

@@ -0,0 +1,24 @@
1
+package com.chinaitop.depot;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
5
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
6
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
7
+
8
+@Configuration
9
+@EnableWebSecurity
10
+public class WebSecurityConfig 
11
+extends WebSecurityConfigurerAdapter 
12
+{
13
+
14
+	@Override
15
+    protected void configure(HttpSecurity http) throws Exception {
16
+		http.authorizeRequests()
17
+		.antMatchers("/**")
18
+		.permitAll() //允许所有用户访问所有资源
19
+        .and()
20
+        .csrf().disable(); // 禁用CSRF(防止伪造的跨域攻击)
21
+
22
+        super.configure(http);
23
+    }
24
+}

+ 4 - 4
src/main/java/com/chinaitop/depot/supervise/mapper/CcZyMapper.xml

@@ -6,8 +6,8 @@
6 6
       tf.id id,
7 7
       sh.storehouse_name house_name,
8 8
       tf.pz kinds,
9
-      to_date(to_char(tf.tfkssj,'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') start_time,
10
-      to_date(to_char(tf.tfjssj,'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') end_time,
9
+      to_char(tf.tfkssj,'yyyy-mm-dd hh24:mi:ss') start_time,
10
+      to_char(tf.tfjssj,'yyyy-mm-dd hh24:mi:ss') end_time,
11 11
       '通风' type,
12 12
       tf.tfzyfzr operator
13 13
       FROM
@@ -31,8 +31,8 @@
31 31
       forrecord.id,
32 32
       forrecord.cfmc house_name,
33 33
       forrecord.lspz kinds,
34
-      forrecord.fumigation_start start_time,
35
-      forrecord.fumigation_end end_time,
34
+      to_char(forrecord.fumigation_start,'yyyy-mm-dd hh24:mi:ss') start_time,
35
+      to_char(forrecord.fumigation_end,'yyyy-mm-dd hh24:mi:ss') end_time,
36 36
       '熏蒸' type,
37 37
       forrecord.operation_supervisor operator
38 38
       FROM t_fumigation_forrecord forrecord

+ 1 - 1
src/main/java/com/chinaitop/depot/supervise/mapper/TestDatasMapper.xml

@@ -103,7 +103,7 @@
103 103
                 t2.storehouse
104 104
             FROM t_testdata t2, basic_storehouse bs
105 105
             WHERE bs.storehouse_id = #{houseid,jdbcType=VARCHAR}
106
-            AND bs.storeh ouse_code = t2.storehouse
106
+            AND bs.storehouse_code = t2.storehouse
107 107
             AND bs.del_flag = 1
108 108
             AND t2.iLq_yq = 0
109 109
             AND t2.org_id = #{orgid,jdbcType=VARCHAR}

+ 6 - 2
src/main/resources/bootstrap.yml

@@ -3,11 +3,15 @@ server:
3 3
   tomcat:
4 4
     uri-encoding: utf-8
5 5
 
6
+management:
7
+  server:
8
+    port: -1
9
+
6 10
 # 注册中心配置
7 11
 eureka:
8 12
   client:
9 13
     service-url:
10
-      defaultZone: http://localhost:9001/eureka/
14
+      defaultZone: http://tj_admin:Admin_1234@${eureka.instance.hostname}:9001/eureka/
11 15
   instance:
12 16
     hostname: 172.16.0.16
13 17
     #hostname: localhost
@@ -56,7 +60,7 @@ spring:
56 60
       max-request-size: 50MB
57 61
 
58 62
 web:
59
-  upload-path: /home/depot/depot-web/apache-tomcat-8.0.53/webapps/ROOT/WEB-INF/classes/static
63
+  upload-path: /home/depot/depot-web/depot-file
60 64
 
61 65
   # 视频监测记录保存位置
62 66
 monitor: