springboot
码者人生
在高并发、高可用、大数据架构、智能运维等技术和管理领域有14年工作经验,长期关注企业信息安全、企业信息化、互联网电商等业务发展方向
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Java技术-Springboot技术入门-创建项目
本节,我们将为您详细讲解如何使用 IDEA 创建一个 Spring Boot 项目。使用 IntelliJ IDEA 创建一个名称为 helloworld 的 Maven 项目原创 2022-10-08 16:45:41 · 383 阅读 · 0 评论 -
springboot2下的单元测试写法
第一种方式直接调用controller Result result = testApiController.test("hello,this is my test info"); Assert.assertTrue(result.isOk()); 第二种:通过rest template ,post提交如下 HttpHeaders headers = new HttpHeaders(); headers.add("param1", "ikong"); headers.add("param2".原创 2020-12-22 15:19:34 · 456 阅读 · 0 评论 -
springboot1.5.7 增加拦截器
最近系统需要改进授权方式,采用拦截器来拦截请求, 一些不需要拦截的,通过addInterceptor.excludePathPatterns排除掉,排除路径通过配置项注入ignorePath 需要拦截的正常拦截 下面代码中写了两个拦截器,作用如下 一个接口需要在两个系统中使用,一个系统A会带上token校验,另一个系统B没有token校验,所以采用双拦截器分别拦截 mark一下,这里加...原创 2018-10-24 17:55:58 · 1833 阅读 · 0 评论 -
springcloud中feign作为客户端的情况下测试timeout设置的问题
关闭熔断 feign.hystrix.enabled=false hystrix.command.default.execution.timeout.enabled=false 起因,在feign作为客户端调用的时候出现这个异常 feign.RetryableException: Read timed out executing GET 具体配置如下 bi-reporter.ribb...原创 2018-10-25 14:51:08 · 5091 阅读 · 0 评论
分享