自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

西蒙老爷的博客

草根码农,只解决问题,不玩高大上

  • 博客(68)
  • 问答 (2)
  • 收藏
  • 关注

原创 java.lang.StackOverflowError 错误的一种可能!检查下JVM中的Xss参数,可以适当调大

Spring Boot 服务启动后出现 如下错误。配置没有什么问题,最后发现是 Dockerfile 中设置 Xss=256偏小。Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/a

2021-05-25 10:00:12 944

原创 Ant Design Pro V5 安装使用注意事项以及所有区块Blocks安装

官方很多文档都是扯淡!!各种 fetch:blocks 命令不要试了,没啥用。本文给出能用的方案,可能还有其他更好的办法。1、参考官方基本安装https://beta-pro.ant.design/docs/getting-started-cn2、安装全部区块Blocks手动下载全部区块:https://github.com/ant-design/pro-blocks然后,在你的Project根目录创建pro-blocks目录,拷贝刚才下载下来的区块文件。在工程目录执行 yarn run

2021-03-28 12:12:20 1862 4

原创 Linux下安装Nexus3并配置阿里云仓库

拉取镜像docker pull docker.io/sonatype/nexus3运行docker run -d --privileged=true --name=nexus3 --restart=always -p 8081:8081 -v /mnt/nexus3_home/nexus-data:/nexus-data sonatype/nexus3-id 创建守护式容器...

2019-12-19 16:38:11 3824 1

原创 Jenkins下 ERROR: Maven JVM terminated unexpectedly with exit code 137

点击【全局设置】设置 MAVAN_OPTS-Xms512m -Xmx1024m

2019-12-19 11:07:04 503

原创 服务器内存升级导致的Docker容器启动失败解决方案

场景: 服务器从8G内存升级到16G。重启机器后,Docker正常,但是镜像启动全部失败,而且没有错误日志。原因:升级之前每个Tomcat镜像分配的容器内存是 1000M, Tomcat中的 catalina.sh 是没有配置的。docker run -d -m 1000M --name tomcat ...升级内存到16G之后,Tomcat启动时申请的内存,在8G 和 16G 两种情况...

2019-12-17 12:40:59 765

原创 maven return code is:400,ReasonPhrase:Repository does not allow updating assets

Controls if deployments of and updates to artifacts are allowed

2019-11-18 10:34:09 1362

原创 spring-cloud-gateway Greenwich.SR2 2.1版本获取requestBody参数的解决方案

版本信息:spring-boot: 2.1.2spring-cloud:Greenwich.SR21.CacheBodyGatewayFilter@Componentpublic class CacheBodyGatewayFilter implements Ordered, GlobalFilter { public static final String CACHE_REQU...

2019-08-19 12:48:39 1535 3

转载 开发小程序使用 HmacSHA1签名加密

var CryptoJS = require('crypto-js')CryptoJS.HmacSHA1(params, "key")

2019-07-29 13:25:34 1343

转载 request body与content-type使用小结

只针对post请求说明比较常见的Content-Type1.application/x-www-form-urlencoded 浏览器原生的form表单形式:key1=value1&key2=value2提交的数据放在body中取值方式:request.getParameter()、request.getParameterMap()2.application/json 消息主体是...

2019-07-28 19:35:30 864

转载 spring boot 处理 Date 日期类型格式化 Json 问题

添加spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8

2019-06-20 14:38:06 829

转载 Extjs 设置grid文本允许复制

添加 enableTextSelection:trueviewConfig:{ enableTextSelection:true}Ext.create('Ext.grid.Panel', { title: 'Simpsons', store: Ext.data.StoreManager.lookup('simpsonsStore'), columns:...

2019-06-17 15:00:31 1176

转载 rabbitmq获取队列消息的2种监听方式

方式一@Componentpublic class RabbitMqListener { @RabbitListener(queues = "demo") public void process(String content) { // }}方式二@Component@RabbitListener(queues = "demo")pub...

2019-06-10 10:07:02 8529 1

原创 spring boot 2.0集成 rabbitMq 实现对象传输

加入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency>...

2019-06-07 19:09:10 898

转载 com.netflix.client.ClientException: Load balancer does not have available server for client

ribbon: eureka: enabled: true

2019-05-07 14:52:55 2164

原创 java.net.ProtocolException: Invalid HTTP method: PATCH

添加<dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-httpclient</artifactId> <version>10.2.0</version>...

2019-05-06 17:09:00 7457 2

原创 Spring boot 设置文件上传大小限制注意事项

版本为 2.0spring: servlet: # 文件上传大小限制 multipart: max-file-size: 2MB max-request-size: 2MB单位需要全大写,否则报错或者直接写完整的数字大小Description:Failed to bind properties under 'spring.servlet.mu...

2019-05-03 21:35:54 6615

原创 Spring boot 使用 openfeign 客户端上传图片步骤,Feign进行跨服务传递图片

场景:上传图片的服务为A,然后B服务通过feign客户端调用A服务并传递 MultipartFile步骤1:加入依赖 <!-- Feign进行跨服务传递文件依赖 --> <dependency> <groupId>io.github.openfeign.form</groupId> <artifactId&g...

2019-05-03 19:09:33 1645

原创 使用 spring-cloud-starter-openfeign 调用微服务能正常处理业务逻辑,但是消费方报异常 404

检查下微服务接口的注解 @RestController 和 @Controller 是否不一致。

2019-04-30 16:14:20 1628 1

原创 Intellij IDEA下使用 Spring-boot-devtools 热部署无效问题

三个步骤1、添加依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>tru...

2019-04-30 15:58:42 318

原创 vscode 小程序开发使用 scss 出现红色警告的解决办法

<style style="scss"> 改成 <style lang="scss">

2019-04-21 15:39:42 4508 2

转载 注解@SpringCloudApplication和@SpringBootApplication的区别

@SpringCloudApplication是一个注解的集合,其中包含@SpringBootApplication。注解@SpringCloudApplication包括:@SpringBootApplication、@EnableDiscoveryClient、@EnableCircuitBreaker,分别是SpringBoot注解、注册服务中心Eureka注解、断路器注解。对于Sprin...

2019-04-04 10:18:31 2580

转载 什么是分布式系统中的幂等性?

最近很多人都在谈论幂等性,好吧,这回我也来聊聊这个话题,光看着俩字,一开始的确有点一头雾水,语文不好嘛,词太专业嘛,对吧现如今我们的系统大多拆分为分布式SOA,或者微服务,一套系统中包含了多个子系统服务,而一个子系统服务往往会去调用另一个服务,而服务调用服务无非就是使用RPC通信或者restful,既然是通信,那么就有可能再服务器处理完毕后返回结果的时候挂掉,这个时候用户端发现很久没有反应,那么...

2019-03-14 10:23:45 301

原创 Required String parameter 'xxxxx' is not present] 报错400

检查实现里面的参数形式是否一致比如 写了 @PathVariable String username 写成了 @RequestParam(&quot;username &quot;) String username

2019-03-12 21:24:37 1027

原创 Spring boot 中使用 spring-boot-starter-data-redis 封装工具类以及Key乱码问题

工具类import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.hongyan.love.core.config.SpringUtils;import org.apache.commons.lang3.StringUtils;import org.springframework.c...

2019-03-03 21:48:11 1319 2

原创 spring boot 中在 okhttp 拦截器 Interceptor 中使用 FeignClient 客户端

首先,编写工具类 SpringUtils@Componentpublic class SpringUtils implements ApplicationContextAware { private static ApplicationContext applicationContext = null; @Override public void setApplic...

2019-02-18 10:34:55 3663

原创 FeignClient作为单独的模块无法在service注入的问题

解决方案:@EnableFeignClients(“com.project”)

2019-02-12 14:16:45 3580

原创 Spring boot 测试的时候 io.lettuce.core.RedisCommandTimeoutException: Command timed out after no timeout

解决方案:redis.timeout 设置大点2019-02-02 19:08:37 | INFO | main | io.lettuce.core.EpollProvider | Starting without optional epoll library2019-02-02 19:08:37 | INFO | main | io.lettuce.core.KqueueProvider...

2019-02-02 19:12:53 3832 2

原创 docker启动tomcat速度慢、容器时间不对和目录挂载等问题解决办法

docker run -d -p 8080:8080--name tomcat --network testnet --network-alias tomcat \-e JAVA_OPTS=&quot;-Duser.timezone=Asia/Shanghai -Djava.security.egd=file:/dev/./urandom&quot; \-v /etc/localtime:/etc/localti...

2019-01-30 15:15:38 2214

原创 Eureka用户名密码配置导致异常 The following has evaluated to null or missing

FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==&amp;amp;amp;amp;gt; replica.key [in template &amp;amp;amp;quot;eureka/navbar.ftl&amp;amp;amp;quot; at line 68, column 62] --

2019-01-28 14:30:36 2946

转载 改变docker的image存放目录

mkdir /home/docker(你想要docker存放image的目录)systemctl stop dockervi /usr/lib/systemd/system/docker.service添加 -g /home/dockercp -R /var/lib/docker/* /home/docker/systemctl daemon-reloadsystemctl star...

2019-01-21 22:20:27 1400

原创 centos 安装 nginx

下载wget -P /root/soft http://nginx.org/download/nginx-1.14.2.tar.gz解压tar zxvf /root/soft/nginx-1.14.2.tar.gz -C /usr/local

2019-01-21 15:54:58 72

原创 Feign logging 开启调用日志

application.yml 配置logging: level: yourproject.userClient: debugFeignConfiguration@Configurationpublic class FeignConfiguration { @Bean Logger.Level feignLoggerLevel() { retu...

2019-01-21 15:03:54 5374 1

原创 [Error] 未发现相关 sass 编译器配置,请检查wepy.config.js文件。

[Error] 未发现相关 sass 编译器配置,请检查wepy.config.js文件。执行 npm install less -d

2019-01-18 16:15:02 1077

原创 npm ERR! Unexpected end of JSON input while parsing near '...tarball":"https://reg'

解决:npm cache clean --force

2019-01-18 14:50:46 2123

原创 zuul 设置全局前缀 prefix,比如 api

zuul: ignoredServices: '*' # 使用 prefix 添加前缀 prefix: /api routes: # 用户服务 user-service: path: /user/** serviceId: user-service strip-prefix: false访问:http://localhost:...

2019-01-17 22:44:56 5963 4

原创 使用config配置中心后,eureka 出现 unknown

bootstrap.yml# 服务注册中心eureka: instance: prefer-ip-address: true instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port} client: service-url: def...

2019-01-14 15:50:31 3110

原创 Maven pom.xml 设置 repository 不起作用的解决方案

举个例子,比如 Spring boot &amp;lt;repositories&amp;gt; &amp;lt;repository&amp;gt; &amp;lt;id&amp;gt;spring-milestones&amp;lt;/id&amp;gt; &amp;lt;name&amp;gt;Spring Milestones&amp;lt;

2019-01-14 11:50:55 7979 1

原创 Eureka 出现 Batch update failure with HTTP status code 401

添加eureka: client: register-with-eureka: false # 是否将自己注册到Eureka Server,默认为true。 fetch-registry: false service-url: defaultZone: http://${REGISTRY_SERVER_USERNAME}:${REGISTRY_SERVER...

2019-01-07 21:56:29 7510

原创 添加 AuthenticationManager 注解后,出现 java.lang.StackOverflowError: null

这里先给出解决方案在 SecurityConfiguration 中配置 @Autowired public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication().withUser("mp").password(...

2019-01-04 11:14:21 4187 4

转载 User must be authenticated with Spring Security before authorization can be completed.

2019-01-03 20:10:11 13811 9

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除