mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 优化空校验处理
This commit is contained in:
		@@ -27,6 +27,9 @@ public class AddressUtils {
 | 
			
		||||
 | 
			
		||||
	public static String getRealAddressByIP(String ip) {
 | 
			
		||||
		String address = UNKNOWN;
 | 
			
		||||
		if (StringUtils.isBlank(ip)){
 | 
			
		||||
			return address;
 | 
			
		||||
		}
 | 
			
		||||
		// 内网不查询
 | 
			
		||||
		ip = "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip);
 | 
			
		||||
		if (NetUtil.isInnerIP(ip)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
package com.ruoyi.framework.config;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.util.ArrayUtil;
 | 
			
		||||
import com.ruoyi.common.exception.ServiceException;
 | 
			
		||||
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
@@ -41,10 +42,13 @@ public class AsyncConfig extends AsyncConfigurerSupport {
 | 
			
		||||
    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
 | 
			
		||||
        return (throwable, method, objects) -> {
 | 
			
		||||
            throwable.printStackTrace();
 | 
			
		||||
            throw new ServiceException(
 | 
			
		||||
                    "Exception message - " + throwable.getMessage()
 | 
			
		||||
                    + ", Method name - " + method.getName()
 | 
			
		||||
                    + ", Parameter value - " + Arrays.toString(objects));
 | 
			
		||||
            StringBuilder sb = new StringBuilder();
 | 
			
		||||
            sb.append("Exception message - ").append(throwable.getMessage())
 | 
			
		||||
                    .append(", Method name - ").append(method.getName());
 | 
			
		||||
            if (ArrayUtil.isNotEmpty(objects)) {
 | 
			
		||||
                sb.append(", Parameter value - ").append(Arrays.toString(objects));
 | 
			
		||||
            }
 | 
			
		||||
            throw new ServiceException(sb.toString());
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user