Springboot 整合 dubbo 的一些坑
最近在做一个分布式的web系统,用的boot+dubbo,中间碰到不少坑,最近碰到的坑可是坑了我三四天,把坑都给大家捎带分享一下,希望能少走弯路。 1. 坑一:与jpa的不兼容 如果你想写这样的jpasql @Query("select g.userIdentity from GroupMembers g where g.userId=?1 and g.groupId=?2") int selectIndentity(Integer userId,Integer groupId); 恭喜你,你可以成功的运行它。但是如果你想要这样 @Transactional @Modifying @Query("update GroupMembers g set g.userIdentity=1 where g.userId=?1 and g.groupId=?2") int updateIdentity(Integer userId,Integer groupId); 那么,对不起!你不可以。如果这样做,你会发现你注册不了服务,消费者也相应的得到nullpointexception异常,这一点你可以...