Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bigsys
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bigsys
Commits
8cf6af79
You need to sign in or sign up before continuing.
Commit
8cf6af79
authored
Aug 28, 2017
by
fangzhipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试dubbo
parent
81d68553
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
78 additions
and
45 deletions
+78
-45
bigsys-auth/pom.xml
bigsys-auth/pom.xml
+2
-37
bigsys-auth/src/main/java/com/bigsys/auth/MyController.java
bigsys-auth/src/main/java/com/bigsys/auth/MyController.java
+7
-2
bigsys-auth/src/main/resources/dubbo-config.xml
bigsys-auth/src/main/resources/dubbo-config.xml
+1
-1
bigsys-auth/src/main/resources/spring-mvc.xml
bigsys-auth/src/main/resources/spring-mvc.xml
+1
-1
bigsys-dubbo/pom.xml
bigsys-dubbo/pom.xml
+13
-0
bigsys-dubbo/src/main/java/com/bigsys/dubbo/App.java
bigsys-dubbo/src/main/java/com/bigsys/dubbo/App.java
+8
-3
bigsys-dubbo/src/main/java/com/bigsys/dubbo/TestService.java
bigsys-dubbo/src/main/java/com/bigsys/dubbo/TestService.java
+7
-0
bigsys-dubbo/src/main/java/com/bigsys/dubbo/TestServiceImpl.java
...dubbo/src/main/java/com/bigsys/dubbo/TestServiceImpl.java
+8
-0
bigsys-dubbo/src/main/resources/dubbo-config.xml
bigsys-dubbo/src/main/resources/dubbo-config.xml
+25
-0
bigsys-redis/pom.xml
bigsys-redis/pom.xml
+1
-0
bigsys-shiro/pom.xml
bigsys-shiro/pom.xml
+1
-1
bigsys-spring/pom.xml
bigsys-spring/pom.xml
+1
-0
bigsys-user/pom.xml
bigsys-user/pom.xml
+1
-0
bigsys-webdemo/pom.xml
bigsys-webdemo/pom.xml
+1
-0
bigsys-webdemo2/pom.xml
bigsys-webdemo2/pom.xml
+1
-0
No files found.
bigsys-auth/pom.xml
View file @
8cf6af79
...
...
@@ -14,10 +14,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<!-- 设置 Spring 的版本 -->
<spring.vesion>
4.3.10.RELEASE
</spring.vesion>
<shiro.version>
1.4.0
</shiro.version>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
@@ -28,48 +25,16 @@
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.bigsys
</groupId>
<artifactId>
bigsys-shiro
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.bigsys
</groupId>
<artifactId>
bigsys-redis
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.bigsys
</groupId>
<artifactId>
bigsys-spring
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
</dependency>
<dependency>
<groupId>
com.github.sgroschupf
</groupId>
<artifactId>
zkclient
</artifactId>
<version>
0.1
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
<version>
2.9.0
</version>
</dependency>
</dependencies>
<build>
<finalName>
auth
</finalName>
</build>
<build>
<finalName>
bigsys-auth
</finalName>
<plugins>
<!--Maven编译插件 配置 -->
<plugin>
...
...
bigsys-auth/src/main/java/com/bigsys/auth/MyController.java
View file @
8cf6af79
package
com
.
bigsys
.
auth
;
import
com.bigsys.dubbo.TestService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
/**
* controller
* @author hwy
...
...
@@ -13,14 +16,16 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public
class
MyController
{
@Resource
private
TestService
testService
;
@RequestMapping
(
value
=
"/test"
)
@ResponseBody
public
String
testSay
(
@RequestParam
(
value
=
"name"
,
defaultValue
=
""
)
String
name
){
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"Dubbo: "
).
append
(
""
);
return
sb
.
toString
();
System
.
out
.
println
(
testService
.
sayHello
());
return
testService
.
sayHello
();
}
}
bigsys-auth/src/main/resources/dubbo-config.xml
View file @
8cf6af79
...
...
@@ -16,7 +16,7 @@
<!--dubbo:protocol name="dubbo" port="20880" /-->
<!-- 声明需要暴露的服务接口 -->
<dubbo:reference
interface=
"TestService"
id=
"testService"
check=
"false"
/>
<dubbo:reference
interface=
"
com.bigsys.dubbo.
TestService"
id=
"testService"
check=
"false"
/>
</beans>
\ No newline at end of file
bigsys-auth/src/main/resources/spring-mvc.xml
View file @
8cf6af79
...
...
@@ -9,7 +9,7 @@
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"
>
<context:component-scan
base-package=
"com.bigsys"
/>
<context:component-scan
base-package=
"com.bigsys
.auth
"
/>
<mvc:annotation-driven
/>
...
...
bigsys-dubbo/pom.xml
View file @
8cf6af79
...
...
@@ -16,6 +16,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
@@ -48,6 +49,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.github.sgroschupf
</groupId>
<artifactId>
zkclient
</artifactId>
<version>
0.1
</version>
</dependency>
<dependency>
<groupId>
com.bigsys
</groupId>
<artifactId>
bigsys-spring
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
...
...
bigsys-dubbo/src/main/java/com/bigsys/dubbo/App.java
View file @
8cf6af79
package
com
.
bigsys
.
dubbo
;
import
org.springframework.context.support.ClassPathXmlApplicationContext
;
/**
* Hello world!
*
*/
public
class
App
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Hello World!"
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
ClassPathXmlApplicationContext
context
=
new
ClassPathXmlApplicationContext
(
new
String
[]{
"dubbo-config.xml"
});
context
.
start
();
System
.
in
.
read
();
// 按任意键退出
}
}
bigsys-dubbo/src/main/java/com/bigsys/dubbo/TestService.java
0 → 100644
View file @
8cf6af79
package
com
.
bigsys
.
dubbo
;
public
interface
TestService
{
String
sayHello
();
}
bigsys-dubbo/src/main/java/com/bigsys/dubbo/TestServiceImpl.java
0 → 100644
View file @
8cf6af79
package
com
.
bigsys
.
dubbo
;
public
class
TestServiceImpl
implements
TestService
{
@Override
public
String
sayHello
()
{
return
"hello world"
;
}
}
bigsys-dubbo/src/main/resources/dubbo-config.xml
0 → 100644
View file @
8cf6af79
<?xml version="1.0" encoding="UTF-8" ?>
<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.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd"
>
<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application
name=
"test_provider"
/>
<!-- 使用zookeeper注册中心暴露服务地址 -->
<dubbo:registry
address=
"zookeeper://192.168.31.147:2181"
/>
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol
name=
"dubbo"
port=
"20881"
/>
<!-- 声明需要暴露的服务接口 -->
<bean
id=
"testService"
class=
"com.bigsys.dubbo.TestServiceImpl"
/>
<!-- 和本地bean一样实现服务 -->
<dubbo:service
interface=
"com.bigsys.dubbo.TestService"
ref=
"testService"
/>
</beans>
\ No newline at end of file
bigsys-redis/pom.xml
View file @
8cf6af79
...
...
@@ -19,6 +19,7 @@
<project.build.jdk>
1.8
</project.build.jdk>
<!-- 设置 Spring 的版本 -->
<spring.vesion>
4.3.10.RELEASE
</spring.vesion>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
bigsys-shiro/pom.xml
View file @
8cf6af79
...
...
@@ -16,7 +16,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
<shiro.version>
1.4.0
</shiro.version>
</properties>
...
...
bigsys-spring/pom.xml
View file @
8cf6af79
...
...
@@ -19,6 +19,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
<!-- 设置 Spring 的版本 -->
<spring.vesion>
4.3.10.RELEASE
</spring.vesion>
...
...
bigsys-user/pom.xml
View file @
8cf6af79
...
...
@@ -19,6 +19,7 @@
<project.build.jdk>
1.8
</project.build.jdk>
<!-- 设置 Spring 的版本 -->
<spring.vesion>
4.3.10.RELEASE
</spring.vesion>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
bigsys-webdemo/pom.xml
View file @
8cf6af79
...
...
@@ -14,6 +14,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
bigsys-webdemo2/pom.xml
View file @
8cf6af79
...
...
@@ -14,6 +14,7 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.jdk>
1.8
</project.build.jdk>
<plugin.maven-compiler>
3.1
</plugin.maven-compiler>
</properties>
<dependencies>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment