
Springboot
沙漏dan
我感受到的压力都是来自于我自己不努力不积极而又不甘于现状的恐慌
展开
-
springboot gradle 使用过程中遇到的问题小结(1)
利用springboot+gradle搭建多模块项目,主要参考博客:https://www.cnblogs.com/dauber/p/9466374.html其中遇到的问题如下:1. 最外层的setting.gradle中include所有模块之后,需要将右侧gradle窗口中多余的根删除掉,不然会有报错导致项目无法运行2. 多个平级模块之间相互引用,旁边的小伙伴不需要,但是我这里需要...原创 2019-07-10 09:58:20 · 822 阅读 · 0 评论 -
springboot gradle 使用过程中遇到的问题小结(2)
想要打包api层,然后出现错误:Plugin request for plugin already on the classpath must not include a version新建的项目中默认的build.gradle中是:id 'org.springframework.boot' version '2.1.6.RELEASE'可以修改为:buildscript ...原创 2019-07-10 20:19:10 · 3953 阅读 · 0 评论 -
springboot gradle 使用过程中遇到的问题小结(3)
1. 生成jar包,本来想生成的是供其他项目引用的jar包。但是利用右侧gradle窗口中的tasks-》build-》bootJar生成的是可执行jar包,并不是想要的,这样的jar包被引用之后,发现找不到对应的包以及所需要的类。应该使用的是右侧gradle窗口中的tasks-》build-》jar生成jar包。两种jar包内结构不同,通过判断jar包结构判断自己生成的是否正确。...转载 2019-07-11 10:28:18 · 716 阅读 · 0 评论 -
springboot dubbo 踩坑(1)
1. 消费者consumer,使用了xml配置,@Reference注解发现注入null,后续改为@Resource即可2. 调用失败,报错:Failed to send response: Response [id=2, version=2.0.0, status=20, event=false, error=null, result=RpcResult [result=per.firs...原创 2019-07-11 14:33:51 · 791 阅读 · 0 评论 -
springboot gradle 使用过程中遇到的问题小结(4)
1. TypeReference使用fastJson反序列化的时候用到为什么使用TypeReference浅谈FastJson的TypeReference用法2. MoreObjects.firstNonNull返回第一个不为空的对象Guava base -- MoreObjects3. RowBounds逻辑分页。之前一直没有注意,还以为最后也是limit,结果查...转载 2019-07-21 10:28:22 · 319 阅读 · 0 评论 -
springboot gradle 使用过程中遇到的问题小结(5)
1. @RequestMapping @PostMapping @GetMapping@GetMapping和@PostMapping是组合注解@GetMapping=@RequestMapping(method = RequestMethod.GET)@PostMapping=@RequestMapping(method = RequestMethod.POST)2. @Va...转载 2019-07-22 09:55:27 · 275 阅读 · 0 评论 -
Spring 注解@Transactional
时刻感觉自己要写出bug的节奏,瑟瑟发抖。最近开发中发现一个问题,在使用@Transactional注解时,发现注解未生效,注解的方法在出现异常时,并没有回滚。因此搜了一些该注解失效的原因。@Transactional注解无效的原因1. 被注解的方法不是public的2. 异常类型不是unchecked类型。如果checked异常也想被回滚,注解上写明异常类型。@Transa...原创 2019-08-18 10:18:02 · 188 阅读 · 0 评论