Skip to content

Commit

Permalink
2.0.6.RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Mar 15, 2019
1 parent 03be639 commit 8d87b6e
Show file tree
Hide file tree
Showing 18 changed files with 76 additions and 48 deletions.
4 changes: 2 additions & 2 deletions demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM java:openjdk-8-jre-alpine

LABEL version="2.0.5.RELEASE"
LABEL version="2.0.6.RELEASE"

MAINTAINER Sim Wang <8966188@qq.com>

ADD target/x7-demo-2.0.5.RELEASE.jar /data/deploy/demo/app.jar
ADD target/x7-demo-2.0.6.RELEASE.jar /data/deploy/demo/app.jar

#RUN bash -c "touch /data/deploy/demo/app.jar"

Expand Down
4 changes: 2 additions & 2 deletions demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.xream.x7</groupId>
<artifactId>x7-demo</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<packaging>jar</packaging>
<name>x7-demo</name>
<description>http://x7.xream.io</description>
Expand All @@ -16,7 +16,7 @@
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.test.skip>true</maven.test.skip>
<docker.image.prefix>xreamio</docker.image.prefix>
<x7.version>2.0.5.RELEASE</x7.version>
<x7.version>2.0.6.RELEASE</x7.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


import io.xream.x7.demo.CatRO;
import io.xream.x7.reyc.DynamicUrl;
import io.xream.x7.reyc.Url;
import io.xream.x7.reyc.ReyClient;
import org.springframework.web.bind.annotation.RequestMapping;

Expand All @@ -12,7 +12,7 @@ public interface TestServiceRemote {


@RequestMapping(value = "/xxx/reyc/test")
Boolean test(CatRO ro, DynamicUrl dynamicUrl);
Boolean test(CatRO ro, Url url);

@RequestMapping(value = "/xxx/reyc/test")
Boolean testFallBack(CatRO ro);
Expand Down
17 changes: 8 additions & 9 deletions demo/src/test/java/io/xream/x7/XxxTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.xream.x7;

import io.xream.x7.demo.TimeJack;
import io.xream.x7.demo.bean.Cat;
import io.xream.x7.demo.CatRO;
import io.xream.x7.demo.bean.Pig;
import io.xream.x7.demo.controller.XxxController;
import io.xream.x7.demo.remote.TestServiceRemote;
import io.xream.x7.reyc.DynamicUrl;
import io.xream.x7.reyc.Url;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import x7.core.util.HttpClientUtil;
Expand Down Expand Up @@ -84,14 +83,14 @@ public void distinct(){

public void testReyClient(){

// testServiceRemote.test(new CatRO(), new DynamicUrl() {
// @Override
// public String url() {
// return "127.0.0.1:8868/xxx/reyc/test";
// }
// });
testServiceRemote.test(new CatRO(), new Url() {
@Override
public String value() {
return "127.0.0.1:8868/xxx/reyc/test";
}
});

testServiceRemote.test(new CatRO(),null);
// testServiceRemote.test(new CatRO(),null);

}

Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.xream.x7</groupId>
<artifactId>x7-parent</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<packaging>pom</packaging>
<name>x7-parent</name>
<description>http://x7.xream.io</description>
Expand All @@ -16,15 +16,15 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.test.skip>true</maven.test.skip>
<x7.version>2.0.5.RELEASE</x7.version>
<x7-core.version>2.0.5.RELEASE</x7-core.version>
<x7.version>2.0.6.RELEASE</x7.version>
<x7-core.version>2.0.6.RELEASE</x7-core.version>
</properties>

<scm>
<connection>scm:git:https://github.com/x-ream/x7</connection>
<developerConnection>scm:git:https://github.com/x-ream/x7</developerConnection>
<url>scm:git:https://github.com/x-ream/x7</url>
<tag>2.0.5.RELEASE</tag>
<tag>2.0.6.RELEASE</tag>
</scm>

<licenses>
Expand Down Expand Up @@ -217,7 +217,7 @@
</execution>
</executions>
</plugin>
<!--

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -232,7 +232,7 @@
</execution>
</executions>
</plugin>
-->

</plugins>
<resources>
<resource>
Expand Down
8 changes: 4 additions & 4 deletions spring-boot-starter-x7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>io.xream.x7</groupId>
<artifactId>x7-parent</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
</parent>

<dependencies>
Expand All @@ -24,19 +24,19 @@
<dependency>
<groupId>io.xream.x7</groupId>
<artifactId>x7-config</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.xream.x7</groupId>
<artifactId>x7-repository</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.xream.x7</groupId>
<artifactId>x7-reyc</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setPassword(String password) {
@Override
public String toString() {
return "DataSourceProperties_R{" +
"url='" + url + '\'' +
"value='" + url + '\'' +
", driverClassName='" + driverClassName + '\'' +
", username='" + username + '\'' +
", password='" + password + '\'' +
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package x7;

import org.springframework.context.annotation.Import;
import x7.config.JacksonConfig;

import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import({JacksonConfig.class})
public @interface EnableDateToLongForJackson {

}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public HikariDataSource getReadDataSource() {


if (Objects.isNull(dataSourceProperties_r.getUrl())) {
logger.info("Readable DataSource Config Key: spring.datasource.read.url");
logger.info("Readable DataSource Config Key: spring.datasource.read.value");
logger.info("Readable DataSource Config Value: null");
logger.info("Readable DataSource Ignored");

Expand Down Expand Up @@ -113,7 +113,7 @@ public HikariDataSource getReadDataSource() {
dsR.setDriverClassName(driverClassName);


logger.info("Readable DataSource Created, url:"+dataSourceProperties_r.getUrl());
logger.info("Readable DataSource Created, value:"+dataSourceProperties_r.getUrl());
return dsR;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
x7.BootConfiguration,\
x7.config.JacksonConfig
x7.BootConfiguration
2 changes: 1 addition & 1 deletion x7-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.xream.x7</groupId>
<artifactId>x7-parent</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
</parent>

<artifactId>x7-config</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions x7-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>io.xream.x7</groupId>
<artifactId>x7-core</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<packaging>jar</packaging>
<name>x7-core</name>
<description>http://x7.xream.io</description>
Expand All @@ -19,14 +19,14 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.test.skip>true</maven.test.skip>
<x7-core.version>2.0.5.RELEASE</x7-core.version>
<x7-core.version>2.0.6.RELEASE</x7-core.version>
</properties>

<scm>
<connection>scm:git:https://github.com/x-ream/x7</connection>
<developerConnection>scm:git:https://github.com/x-ream/x7</developerConnection>
<url>scm:git:https://github.com/x-ream/x7</url>
<tag>2.0.5.RELEASE</tag>
<tag>2.0.6.RELEASE</tag>
</scm>

<licenses>
Expand Down Expand Up @@ -150,7 +150,7 @@
</execution>
</executions>
</plugin>
<!--

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -165,7 +165,7 @@
</execution>
</executions>
</plugin>
-->

</plugins>
<resources>
<resource>
Expand Down
4 changes: 2 additions & 2 deletions x7-repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.xream.x7</groupId>
<artifactId>x7-parent</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
</parent>

<artifactId>x7-repository</artifactId>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>io.xream.x7</groupId>
<artifactId>x7-config</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
<scope>compile</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions x7-reyc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>x7-parent</artifactId>
<groupId>io.xream.x7</groupId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
</parent>
<artifactId>x7-reyc</artifactId>
<description>http://x7.xream.io</description>
Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>io.xream.x7</groupId>
<artifactId>x7-core</artifactId>
<version>2.0.5.RELEASE</version>
<version>2.0.6.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-spring-boot2 -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion x7-reyc/src/main/java/io/xream/x7/reyc/ReyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
String IGNORE_CIRCUITBREAKER = "IGNORE_CIRCUITBREAKER";

/**
* dns or url
* dns or value
*/
String value() default "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package io.xream.x7.reyc;

public interface DynamicUrl {
public interface Url {

String url();
String value();
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void setFallback(Object fallback) {
public String toString() {
return "ClientParsed{" +
"objectType=" + objectType +
", url='" + url + '\'' +
", value='" + url + '\'' +
", map=" + map +
", fallbackMethodMap=" + fallbackMethodMap +
", fallback=" + fallback +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.github.resilience4j.retry.Retry;
import io.github.resilience4j.retry.RetryRegistry;
import io.vavr.control.Try;
import io.xream.x7.reyc.DynamicUrl;
import io.xream.x7.reyc.Url;
import io.xream.x7.reyc.ReyClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -75,9 +75,9 @@ protected static Object resolve(String remoteIntfName, String methodName, Object
List<Object> objectList = new ArrayList<>();
boolean flag = false;
for (Object arg : args){
if (arg != null && arg instanceof DynamicUrl){
DynamicUrl dynamicUrl = (DynamicUrl)arg;
url = dynamicUrl.url();
if (arg != null && arg instanceof Url){
Url dynamicUrl = (Url)arg;
url = dynamicUrl.value();
flag = true;
}else{
objectList.add(arg);
Expand Down

0 comments on commit 8d87b6e

Please sign in to comment.