springboot
码者人生
在高并发、高可用、大数据架构、智能运维等技术和管理领域有14年工作经验,长期关注企业信息安全、企业信息化、互联网电商等业务发展方向
展开
-
Java技术-Springboot技术入门-创建项目
本节,我们将为您详细讲解如何使用 IDEA 创建一个 Spring Boot 项目。使用 IntelliJ IDEA 创建一个名称为 helloworld 的 Maven 项目原创 2022-10-08 16:45:41 · 313 阅读 · 0 评论 -
springboot2下的单元测试写法
第一种方式直接调用controllerResult 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 · 374 阅读 · 0 评论 -
springboot1.5.7 增加拦截器
最近系统需要改进授权方式,采用拦截器来拦截请求,一些不需要拦截的,通过addInterceptor.excludePathPatterns排除掉,排除路径通过配置项注入ignorePath需要拦截的正常拦截下面代码中写了两个拦截器,作用如下一个接口需要在两个系统中使用,一个系统A会带上token校验,另一个系统B没有token校验,所以采用双拦截器分别拦截mark一下,这里加...原创 2018-10-24 17:55:58 · 1755 阅读 · 0 评论 -
springcloud中feign作为客户端的情况下测试timeout设置的问题
关闭熔断feign.hystrix.enabled=falsehystrix.command.default.execution.timeout.enabled=false起因,在feign作为客户端调用的时候出现这个异常feign.RetryableException: Read timed out executing GET具体配置如下bi-reporter.ribb...原创 2018-10-25 14:51:08 · 5022 阅读 · 0 评论