Commit 55b7e934 authored by fangzhipeng's avatar fangzhipeng

增加多注册功能

parent e412c115
......@@ -18,8 +18,8 @@ import javax.annotation.Resource;
@Controller
public class MyController {
// @Resource
// private TestService testService;
@Resource
private TestService testService;
@Resource
BsTestMapper bsTestMapper;
......@@ -28,7 +28,7 @@ public class MyController {
public BsTest testSay(@RequestParam(value = "name",defaultValue = "") String name){
StringBuffer sb = new StringBuffer();
sb.append("Dubbo: ").append("");
// System.out.println(testService.sayHello());
System.out.println(testService.sayHello());
BsTest bsTest = new BsTest();
bsTest.setName("呜呜呜呜无无");
// bsTestMapper.insert(bsTest);
......
......@@ -6,17 +6,25 @@
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<!--&lt;!&ndash; 提供方应用信息,用于计算依赖关系 &ndash;&gt;-->
<!--<dubbo:application name="test_consumer" />-->
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="bigsys-auth-project" />
<!--&lt;!&ndash; 使用zookeeper注册中心暴露服务地址 &ndash;&gt;-->
<!--<dubbo:registry address="zookeeper://192.168.1.65:2181" />-->
<!--&lt;!&ndash; 用dubbo协议在20880端口暴露服务 &ndash;&gt;-->
<!--&lt;!&ndash;dubbo:protocol name="dubbo" port="20880" /&ndash;&gt;-->
<!-- 使用zookeeper注册中心暴露服务地址 -->
<dubbo:registry address="zookeeper://localhost:2181" />
<!--&lt;!&ndash; 声明需要暴露的服务接口 &ndash;&gt;-->
<!--<dubbo:reference interface="com.bigsys.dubbo.TestService" id="testService" check="false" />-->
<!--<bean id="testService" class="com.bigsys.dubbo.TestServiceImpl"/>-->
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol id="dubbo" name="dubbo" port="20880" />
<!-- 和本地bean一样实现服务 -->
<dubbo:service interface="com.bigsys.auth.api.AppAuth" ref="appAuth" protocol="dubbo"/>
<dubbo:reference interface="com.bigsys.dubbo.TestService" id="testService" check="false"/>
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol id="dubbo2" name="dubbo" port="20882" />
<dubbo:service interface="com.bigsys.auth.api.AppAuth" ref="appAuth" protocol="dubbo2"/>
</beans>
\ No newline at end of file
......@@ -12,10 +12,29 @@
<url>http://maven.apache.org</url>
<description>用户和应用授权中心</description>
<properties>
<project.build.jdk>1.8</project.build.jdk>
</properties>
<modules>
<module>bigsys-auth-api</module>
<module>bigsys-auth-project</module>
</modules>
<build>
<plugins>
<!--Maven编译插件 配置 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugin.maven-compiler}</version>
<configuration>
<source>${project.build.jdk}</source>
<target>${project.build.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -36,6 +36,10 @@
<artifactId>spring</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javaassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
......@@ -61,6 +65,13 @@
<artifactId>bigsys-spring</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.1-GA</version>
</dependency>
</dependencies>
<build>
......
......@@ -8,6 +8,11 @@
<artifactId>bigsys</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.jdk>1.8</project.build.jdk>
</properties>
<modules>
<module>bigsys-redis</module>
<module>bigsys-auth</module>
......@@ -19,5 +24,20 @@
<module>bigsys-webdemo2</module>
</modules>
<build>
<plugins>
<!--Maven编译插件 配置 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugin.maven-compiler}</version>
<configuration>
<source>${project.build.jdk}</source>
<target>${project.build.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment