项目结构可以这样:
parent:统一管理jar包版本号
common:常用工具类和base类
model:每个model为一个maven聚合工程
model-api:provider接口
model-core:provider实现 在该工程中集合mybatis jdbc链接配置,一个model一个数据库
model-bean:提供相应的域对象
web:consumer端,集合控制层
声明:zookeeper集群的话,地址用逗号隔开
provider端:
xml配置如下
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://code.alibabatech.co