上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 96 下一页
摘要: 在spring boot中, repository中使用@Query注解使用hql查询,使用@Param引用参数 如题报错: For queries with named parameters you need to use provide names for method parameters. 阅读全文
posted @ 2018-04-12 23:09 Angel挤一挤 阅读(4951) 评论(1) 推荐(1)
摘要: 接着上一篇来说, 不管正常返回结果还是后台出现异常,应该返回给前台统一的响应格式。 所以这一篇就为了应对解决这个问题。 1.首先,定义一个统一返回类【所有返回的格式都是这个类的格式】 package com.sxd.sweeping.response; import com.alibaba.fast 阅读全文
posted @ 2018-04-11 17:50 Angel挤一挤 阅读(24660) 评论(0) 推荐(2)
摘要: grpc默认使用的Google 开源的一套成熟的结构数据序列化机制 参考地址:https://blog.csdn.net/shensky711/article/details/69696392 参考地址:https://blog.csdn.net/yansmile1/article/details/ 阅读全文
posted @ 2018-04-11 11:26 Angel挤一挤 阅读(220) 评论(0) 推荐(0)
摘要: 注解@SpringBootApplication 相当于 @Configuration、@EnableAutoConfiguration 、 @ComponentScan 三个的作用 代码示例:GitHub地址 @Configuration 作用在一个类上,相当于xml文件的配置的beans。下面可 阅读全文
posted @ 2018-04-11 11:19 Angel挤一挤 阅读(743) 评论(0) 推荐(0)
摘要: RPC框架的对比 阅读全文
posted @ 2018-04-11 10:40 Angel挤一挤 阅读(222) 评论(0) 推荐(0)
摘要: spring boot+grpc的使用 参考:https://baijiahao.baidu.com/s?id=1573961922096412&wfr=spider&for=pc 阅读全文
posted @ 2018-04-11 10:40 Angel挤一挤 阅读(3007) 评论(0) 推荐(0)
摘要: windows上快捷键: Ctrl+O Mac上快捷键: command+O 在要重写父类方法的位置 ,按下快捷键,然后选择要重写的方法即可。 阅读全文
posted @ 2018-04-09 16:49 Angel挤一挤 阅读(5014) 评论(0) 推荐(0)
摘要: 数据库字段gender为枚举类型,从前台接受到实体后进行保存报错:org.postgresql.util.PSQLException: ERROR: column "gender" is of type gender but expression is of type character varyi 阅读全文
posted @ 2018-04-09 15:35 Angel挤一挤 阅读(1698) 评论(0) 推荐(0)
摘要: 如图所示: 最后: 问题解决: 这个原因是因为,User类并未给字段提供get/set方法,所以给前台传递过去的值是空的。 解决方案: 为User类添lombok的注解@Data,为实体类提供get/set方法 阅读全文
posted @ 2018-04-09 14:09 Angel挤一挤 阅读(2475) 评论(0) 推荐(0)
摘要: 如题: 使用repository进行查询,使用CrudRepository自带的getOne()方法和findById()方法查询,数据库中有这条数据,但是并不能查到。 userRepository.getOne(id)和userRepository.findById(id)无法从数据库查询到数据。 阅读全文
posted @ 2018-04-09 12:36 Angel挤一挤 阅读(1470) 评论(3) 推荐(0)
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 96 下一页