Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Debri committed May 29, 2017
1 parent f775c43 commit 3c02f35
Show file tree
Hide file tree
Showing 41 changed files with 523 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
*.iml
out
gen

target
2 changes: 0 additions & 2 deletions debri-data-api/pom.xml → dubbo-demo/debri-data-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@
<packaging>jar</packaging>
<description>定义服务的API</description>
<artifactId>debri-data-api</artifactId>


</project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<packaging>jar</packaging>
<artifactId>debri-data-provider</artifactId>
<dependencies>

<dependency>
<groupId>geek.com</groupId>
<artifactId>debri-data-api</artifactId>
Expand Down Expand Up @@ -39,6 +38,21 @@
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.geek.domain;

/**
* Created by Liuqi
* Date: 2017/5/19.
*/
@Entity
@
public class Security {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.geek.provider;
package com.geek.test;

import com.geek.api.TestService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

<dubbo:service interface="com.geek.api.TestService" ref="testService" protocol="dubbo" timeout="100000"
retries="0"/>
<bean id="testService" class="com.geek.provider.TestServiceImpl"/>
<bean id="testService" class="com.geek.test.TestServiceImpl"/>

</beans>
13 changes: 11 additions & 2 deletions debri-openAPI/pom.xml → dubbo-demo/debri-openAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>

<dependency>
<groupId>geek.com</groupId>
<artifactId>debri-data-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.geek.web;

import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
* Created by Liuqi
* Date: 2017/5/7.
*/
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 1800)//session超时时间1800秒
public class HttpSessionConfig {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.geek.web;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RestController;

/**
* Created by Liuqi
* Date: 2017/5/7.
*/
@EnableAutoConfiguration
@RestController
public class UserController {
}
22 changes: 22 additions & 0 deletions dubbo-demo/debri-openAPI/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# REDIS (RedisProperties)
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=127.0.0.1
# Redis服务器连接端口
spring.redis.port=6379

# Redis服务器连接密码(默认为空)
#spring.redis.password=123456

# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=2
# 连接超时时间(毫秒)
spring.redis.timeout=10
spring.session.store-type=redis
16 changes: 16 additions & 0 deletions dubbo-demo/debri-openAPI/src/main/resources/applicationContext.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="postDataServiceMap" class="java.util.HashMap">
<constructor-arg>
<map>
<entry key="debri.sync">
<bean class="com"
</entry>
</map>
</constructor-arg>
</bean>

</beans>
14 changes: 14 additions & 0 deletions dubbo-demo/debri-openAPI/src/main/resources/dubbo-service.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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="dearbinge-parkingspot-consumer" />
<!-- 使用zookeeper广播注册中心暴露发现服务地址 -->
<dubbo:registry address="zookeeper://192.168.1.118:2181" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="securityService"
interface="com.dearbinge.data.api.SecurityService" timeout="100000"
retries="0" />
</beans>
Empty file.
15 changes: 15 additions & 0 deletions dubbo-demo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>liu</artifactId>
<groupId>geek.com</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-demo</artifactId>


</project>
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<module>soa-product</module>
<module>soa-trade</module>
<module>soa-consumer-web</module>
<module>dubbo-demo</module>

</modules>
<properties>
Expand Down Expand Up @@ -160,6 +161,11 @@
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
<dependency>
Expand Down
File renamed without changes.
106 changes: 90 additions & 16 deletions soa-consumer-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,117 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- <parent>
<parent>
<artifactId>liu</artifactId>
<groupId>geek.com</groupId>
<version>1.0-SNAPSHOT</version>
</parent>-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>soa-consumer-web</artifactId>
<dependencies>
<!-- soa -->
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>soa-product-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>soa-user-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>soa-order-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<groupId>${project.parent.groupId}</groupId>
<artifactId>soa-trade-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<groupId>${project.parent.groupId}</groupId>
<artifactId>soa-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- log -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<!--<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>-->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.7</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8081</port>
<maxIdleTime>30000</maxIdleTime>
</connector>
</connectors>
<webAppSourceDirectory>${project.build.directory}/${project.artifactId}-${project.version}
</webAppSourceDirectory>
<contextPath>/</contextPath>
</configuration>
</plugin>
</plugins>

Expand Down
Loading

0 comments on commit 3c02f35

Please sign in to comment.