网站和APP dao和service层都一样,只是controller层不一样。
求推荐分布式技术解决方案;
我知道的有
1、jdk自带的 RMI, 麻烦的就是要写接口和bean生成jar包给客户端再调用
2、用rest http相当于再写一个接口,所有接口都需要修改也有点麻烦,
有其他更好的方案么?或者框架?
PHPz2017-04-17 17:09:45
You can look at Facebook’s thrift or Taobao’s dubbo, which are of course similar to rmi.
If you don’t have to pursue distribution, the simplest thing is to provide the service as a separate jar package to different web projects.
In fact, no matter how you do it in the controller, you only need to do the operations of verifying parameters and combining/encapsulating results