Commit c3b5cb20d847f24cd7c2545c65ab01c88767aaf3

Authored by 若依
Committed by Gitee
2 parents 7afc5acc 2daf89e0

!25 Live轻量级PR

Merge pull request !25 from Live/live
ruoyi-ui/public/robots.txt 0 → 100644
  1 +User-agent: *
  2 +Disallow: /
0 3 \ No newline at end of file
... ...
ruoyi-ui/vue.config.js
... ... @@ -117,7 +117,11 @@ module.exports = {
117 117 }
118 118 }
119 119 })
120   - config.optimization.runtimeChunk('single')
  120 + config.optimization.runtimeChunk('single'),
  121 + {
  122 + from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件
  123 + to:'./',//到根目录下
  124 + }
121 125 }
122 126 )
123 127 }
... ...
ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
... ... @@ -118,7 +118,7 @@ public class HttpUtils
118 118 StringBuilder result = new StringBuilder();
119 119 try
120 120 {
121   - String urlNameString = url + "?" + param;
  121 + String urlNameString = url;
122 122 log.info("sendPost - {}", urlNameString);
123 123 URL realUrl = new URL(urlNameString);
124 124 URLConnection conn = realUrl.openConnection();
... ...
ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java
... ... @@ -40,7 +40,7 @@ public class IpUtils
40 40 {
41 41 ip = request.getRemoteAddr();
42 42 }
43   -
  43 + ip = EscapeUtil.clean(ip);//清除Xss特殊字符
44 44 return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
45 45 }
46 46  
... ...
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java
... ... @@ -58,11 +58,11 @@ public class GenUtils
58 58 {
59 59 column.setHtmlType(GenConstants.HTML_INPUT);
60 60  
61   - // 如果是浮点型
  61 + // 如果是浮点型 统一用BigDecimal
62 62 String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
63 63 if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
64 64 {
65   - column.setJavaType(GenConstants.TYPE_DOUBLE);
  65 + column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
66 66 }
67 67 // 如果是整形
68 68 else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
... ...