Commit b9ba17a477266a16c77bfeea2a606aa17f634fd4
1 parent
bb011065
!31 IP查询导致异常问题
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/IPUtils.java
| @@ -51,7 +51,7 @@ public class IPUtils { | @@ -51,7 +51,7 @@ public class IPUtils { | ||
| 51 | */ | 51 | */ |
| 52 | @SneakyThrows | 52 | @SneakyThrows |
| 53 | public static Integer getAreaId(String ip) { | 53 | public static Integer getAreaId(String ip) { |
| 54 | - return Integer.parseInt(SEARCHER.search(ip)); | 54 | + return Integer.parseInt(SEARCHER.search(ip.trim())); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | /** | 57 | /** |