使用技术 Dubbox+SSM+angularJS+bootstrap
1.引用dubbo服务配置
<dubbo:application name="dubboxdemo-web" />
<dubbo:registry address="zookeeper://192.168.25.132:2181"/>
<-- 扫描配置注解的包 -->
<dubbo:annotation package="cn.itcast.dubboxdemo.controller" />
2.pom.xml文件中引入依赖
<-- 引入dubbo和zookeeper -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>
<dependency>
<groupId>com.github.sgroschupf</groupId>
<artifactId>zkclient</artifactId>
</dependency>
3.注意事项:
1 . 实体类中需要实现Serializeable接口
2 . 服务层中@Service需要使用 com.alibaba.dubbo.config.annotation.Service包下的注解
3 . @RestController 相当于 @Controller+@Responsebody