!25 Live轻量级PR

Merge pull request !25 from Live/live
This commit is contained in:
若依 2020-06-10 22:04:51 +08:00 committed by Gitee
commit c3b5cb20d8
5 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -117,7 +117,11 @@ module.exports = {
} }
} }
}) })
config.optimization.runtimeChunk('single') config.optimization.runtimeChunk('single'),
{
from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件
to:'./',//到根目录下
}
} }
) )
} }

View File

@ -118,7 +118,7 @@ public class HttpUtils
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
try try
{ {
String urlNameString = url + "?" + param; String urlNameString = url;
log.info("sendPost - {}", urlNameString); log.info("sendPost - {}", urlNameString);
URL realUrl = new URL(urlNameString); URL realUrl = new URL(urlNameString);
URLConnection conn = realUrl.openConnection(); URLConnection conn = realUrl.openConnection();

View File

@ -40,7 +40,7 @@ public class IpUtils
{ {
ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
} }
ip = EscapeUtil.clean(ip);//清除Xss特殊字符
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
} }

View File

@ -58,11 +58,11 @@ public class GenUtils
{ {
column.setHtmlType(GenConstants.HTML_INPUT); column.setHtmlType(GenConstants.HTML_INPUT);
// 如果是浮点型 // 如果是浮点型 统一用BigDecimal
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
{ {
column.setJavaType(GenConstants.TYPE_DOUBLE); column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
} }
// 如果是整形 // 如果是整形
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)