1.springcloud 启动时出现莫名的ip
Fetching config from server at http://192.1.1.133:8888
还有种场景是 Fetching config from server at : http://192.1.1.133:8888
这里的192.1.1.133是指镜像布置后自键overlay类型网段下的ip ,与本地开发机网不通
2.Spring Cloud基于Spring Boot,为微服务体系开发中的架构问题,提供了一整套的解决方案——服务注册与发现,服务消费,服务保护与熔断,网关,分布式调用追踪,分布式配置管理等。这一系列怎么实现的。
Eureka:服务治理组件,包含服务注册与发现 Hystrix:容错管理组件,实现了熔断器 Ribbon:客户端负载均衡的服务调用组件
Feign:基于Ribbon和Hystrix的声明式服务调用组件 Zuul:网关组件,提供智能路由、访问过滤等功能
Archaius:外部化配置组件
3.怎么看数据库占用内存大小
select concat(round(sum(DATA_LENGTH/1024/1024/1024),2),'GB') as data from information_schema.TABLES where table_schema='dbname';
4.去掉宽空格,其实是去掉所有类型的空格
private static Pattern STRING_PATTERN = Pattern.compile(" *| *| *|\\s*|\t|\n" + "|\n");
5.ProceedingJoinPoint is only supported for around advice
Before不支持ProceedingJoinPoint,将其改为:JoinPoint
6.Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity
jpa写法 entity 加@id 注解
7.Mac idea 增加jvm内存
/Applications/IntelliJ IDEA.app/Contents/bin vim idea.vmoptions
8.Java8 的对象的list 转成其中一个属性的list
List<String> nameList = userList.stream().map(User::getName).collect(Collectors.toList());
question:9.Es复制索引
curl -XPOST '127.0.0.1:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
{"source": {"index": "indexname","size":1000},"dest": {"index": "indexname_copy"}}'
question:10.mysqldump 导表结构
mysqldump -h 127.0.0.1 -P3306 --skip-lock-tables -uroot -p -t dbname --tables tablename > table.sql
question:11.mysqldump 导表结构和insert的数据
mysqldump -h 127.0.0.1 -P3306 dbname --skip-lock-tables -uroot -p --tables tablename > tablename.sql