
java
携码之旅
这个作者很懒,什么都没留下…
展开
-
Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExce
在使用spring-cloud-starter-netflix-eureka-client时,启动项目遇到以下异常:Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is java.lang.NullPointerExceorg.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoService原创 2021-06-25 10:18:12 · 5266 阅读 · 2 评论 -
ES的java接口调用异常信息:java.lang.RuntimeException: Request cannot be executed; I/O reactor status: STOPPED
一、异常信息java.lang.RuntimeException: Request cannot be executed; I/O reactor status: STOPPED at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:796) at org.elasticsearch.client.RestClient.performRequest(RestClient.ja原创 2021-04-19 14:56:01 · 5321 阅读 · 0 评论 -
请求参数类型不一致导致后端无法接收请求异常:Did not find handler method for [/xxx]
1.问题描述: 前端页面携带参数发起ajax的GET请求,controller层用@ModelAttribute+对象接收,无法接收前端请求和参数;2.异常信息:2021-03-10 14:49:03.467 [http-nio-8082-exec-1] DEBUG [springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping] - Looking up handler method...原创 2021-03-10 14:58:05 · 2013 阅读 · 0 评论 -
spring boot所打的jar在服务器启动时,日志打印时间、jar所使用时间和系统当前时间不一致
1.spring boot所打的jar在服务器启动时,日志打印时间、jar所使用时间和系统当前时间不一致1)系统时间2)日志打印时间2.解决方法在启动的时间添加-Duser.timezone=GMT+8,将时区改为东8区java -jar -Duser.timezone=GMT+8 xxxx.jar...原创 2021-01-27 14:28:01 · 1631 阅读 · 0 评论 -
JAVA设计模式-工厂模式
一、工厂方法模式interface BeerFactory{ void createBeer();}class QingDaoBeerFactory implements BeerFactory{ @Override public void createBeer() { System.out.println("青岛啤酒厂生产啤酒"); }}class XueHuaBeerFactory implements BeerFactory{ @O原创 2020-08-02 15:04:29 · 160 阅读 · 0 评论 -
JAVA设计模式-单例模式
一、懒汉模式public class LazySingleton { private volatile static LazySingleton instance=null; //私有构造方法 private LazySingleton(){ }; //提供全局访问接口 public static LazySingleton getInstance(){ if (instance==null){ synchro原创 2020-08-02 13:05:37 · 143 阅读 · 0 评论 -
Map大家族中的HashMap源码分析------1.hashMap.put分析
说明本文主要是对jdk1.8的HashMap的put方法的源码进行了分析,主要介绍点包括:put操作流程、map初始化、map扩容、链表转红黑树等源码,如若在分析当中有错误,请各位支出,以便更新,谢谢;1.map.put()源码注释/** * Implements Map.put and related methods * * @param hash hash for key * @param key the key * @param valu原创 2020-05-10 16:27:42 · 180 阅读 · 0 评论