因为之前我们使用redis来解决问题,但是后来没有使用redis了,就没有把redis的jar删除,但是项目在linux上面启动的时候总报下面的错误:
2018-03-13 14:11:20.980 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/wxPayRefund/v1/payRefund],methods=[POST]}" onto public java.lang.Object com.kuaiing.wxPay.controller.WxPayRefundController.wxPay(com.kuaiing.wxPay.dto.WxPayRefundDto) throws java.lang.Exception2018-03-13 14:11:20.981 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/wxReconfile/v1/wx/recon/{tradeDate}],methods=[GET]}" onto public void com.kuaiing.wxPay.controller.WxReconFileController.wxAutoRecon(java.lang.String) throws java.lang.Exception2018-03-13 14:11:20.983 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/wxReconfile/v1/wx/downFile/{billDate}],methods=[POST]}" onto public java.lang.Object com.kuaiing.wxPay.controller.WxReconFileController.wxReconfile(java.lang.String) throws java.lang.Exception2018-03-13 14:11:20.983 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/wxReconfile/v1/wx/reconFile/{tradeDate}],methods=[GET]}" onto public java.lang.Object com.kuaiing.wxPay.controller.WxReconFileController.selectWxReconByDate(java.lang.String)2018-03-13 14:11:20.983 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/wxReconfile/v1/wx/reconFiles/{tradeDate}],methods=[GET]}" onto public void com.kuaiing.wxPay.controller.WxReconFileController.wxReconfileSum(java.lang.String)2018-03-13 14:11:20.985 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/v2/api-docs],methods=[GET],produces=[application/json || application/hal+json]}" onto public org.springframework.http.ResponseEntityspringfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)2018-03-13 14:11:20.990 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/ui]}" onto org.springframework.http.ResponseEntityspringfox.documentation.swagger.web.ApiResourceController.uiConfiguration()2018-03-13 14:11:20.990 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources]}" onto org.springframework.http.ResponseEntity> springfox.documentation.swagger.web.ApiResourceController.swaggerResources()2018-03-13 14:11:20.991 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/security]}" onto org.springframework.http.ResponseEntityspringfox.documentation.swagger.web.ApiResourceController.securityConfiguration()2018-03-13 14:11:21.002 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)2018-03-13 14:11:21.003 INFO 31172 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity>
org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)2018-03-13 14:11:21.276 ERROR 31172 --- [ main]
redis.clients.jedis.HostAndPort : cant resolve localhost addressjava.net.UnknownHostException: test: test: Name or service not knownat
java.net.InetAddress.getLocalHost(InetAddress.java:1505)at redis.clients.jedis.HostAndPort.getLocalHostQuietly(HostAndPort.java:105)at redis.clients.jedis.HostAndPort.(HostAndPort.java:12)at redis.clients.jedis.JedisFactory.(JedisFactory.java:37)at redis.clients.jedis.JedisPool.(JedisPool.java:185)at redis.clients.jedis.JedisPool.(JedisPool.java:169)at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createRedisPool(JedisConnectionFactory.java:275)at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.createPool(JedisConnectionFactory.java:250)at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.afterPropertiesSet(JedisConnectionFactory.java:237)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)at
经测试只要将redis的相关jar包删除就可以.但是我还是有疑问,我在代码中并没有启用redis且在yml中也没有配置redis的host地址,仅仅引入jar还是会报错.希望有大神能够解释