提交者
Gitee
!25 Live轻量级PR
Merge pull request !25 from Live/live
正在显示
5 个修改的文件
包含
11 行增加
和
5 行删除
ruoyi-ui/public/robots.txt
0 → 100644
| @@ -117,7 +117,11 @@ module.exports = { | @@ -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 | } |
| @@ -118,7 +118,7 @@ public class HttpUtils | @@ -118,7 +118,7 @@ public class HttpUtils | ||
| 118 | StringBuilder result = new StringBuilder(); | 118 | StringBuilder result = new StringBuilder(); |
| 119 | try | 119 | try |
| 120 | { | 120 | { |
| 121 | - String urlNameString = url + "?" + param; | 121 | + String urlNameString = url; |
| 122 | log.info("sendPost - {}", urlNameString); | 122 | log.info("sendPost - {}", urlNameString); |
| 123 | URL realUrl = new URL(urlNameString); | 123 | URL realUrl = new URL(urlNameString); |
| 124 | URLConnection conn = realUrl.openConnection(); | 124 | URLConnection conn = realUrl.openConnection(); |
| @@ -40,7 +40,7 @@ public class IpUtils | @@ -40,7 +40,7 @@ public class IpUtils | ||
| 40 | { | 40 | { |
| 41 | ip = request.getRemoteAddr(); | 41 | ip = request.getRemoteAddr(); |
| 42 | } | 42 | } |
| 43 | - | 43 | + ip = EscapeUtil.clean(ip);//清除Xss特殊字符 |
| 44 | return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; | 44 | return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; |
| 45 | } | 45 | } |
| 46 | 46 |
| @@ -58,11 +58,11 @@ public class GenUtils | @@ -58,11 +58,11 @@ public class GenUtils | ||
| 58 | { | 58 | { |
| 59 | column.setHtmlType(GenConstants.HTML_INPUT); | 59 | column.setHtmlType(GenConstants.HTML_INPUT); |
| 60 | 60 | ||
| 61 | - // 如果是浮点型 | 61 | + // 如果是浮点型 统一用BigDecimal |
| 62 | String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); | 62 | String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); |
| 63 | if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) | 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 | else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) | 68 | else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) |
-
请 注册 或 登录 后发表评论