赞
踩
错误信息:
-
- Caused by: java.lang.IllegalArgumentException: hostname can't be null
- at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149)
- at java.net.InetSocketAddress.<init>(InetSocketAddress.java:216)
- at com.orange.config.FoticConfig.foticFTPService(FoticConfig.java:27)
- at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f.CGLIB$foticFTPService$2(<generated>)
- at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f$$FastClassBySpringCGLIB$$428e4182.invoke(<generated>)
- at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
- at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
- at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f.foticFTPService(<generated>)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
- ... 48 common frames omitted
其中一种原因:
配置文件内的IP没配置上或ip为null,导致第三方连接失败,可以看看控制台报错的上方应该有具体的报错类说明
解决方式:
查阅下自己的配置文件是否都已配置,是否为null,是的话修改下即可
注:我的问题在于spring boot2.0的yml文件没配置ftp的ip连接地址
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。