Commit 1d2dddc0 by 刘宇峰

框架完善-dubbo保持与公司版本一致,elasticjob与公司版本一致

1 parent 53b2c69a
......@@ -24,7 +24,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<curator.version>4.2.0</curator.version>
<curator.version>2.12.0</curator.version>
</properties>
<dependencyManagement>
......@@ -44,11 +44,6 @@
<artifactId>curator-client</artifactId>
<version>${curator.version}</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-x-discovery</artifactId>
<version>${curator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -43,7 +43,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<curator.version>4.2.0</curator.version>
<curator.version>2.12.0</curator.version>
</properties>
<dependencyManagement>
......@@ -88,11 +88,6 @@
<artifactId>curator-client</artifactId>
<version>${curator.version}</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-x-discovery</artifactId>
<version>${curator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -28,10 +28,10 @@
<!-- <groupId>com.glsx</groupId>-->
<!-- <artifactId>rest-admin-sleuth</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-monitor</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.glsx</groupId>-->
<!-- <artifactId>rest-admin-monitor</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-gateway-client</artifactId>
......
......@@ -12,7 +12,7 @@
<artifactId>rest-admin-dubbo</artifactId>
<properties>
<curator.version>4.2.0</curator.version>
<curator.version>2.12.0</curator.version>
<dubbo.version>2.7.7</dubbo.version>
<zookeeper.version>3.4.6</zookeeper.version>
</properties>
......
package com.glsx.plat.dubbo.config;
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
import static org.apache.dubbo.spring.boot.util.DubboUtils.*;
import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import com.alibaba.spring.context.config.ConfigurationBeanBinder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.core.env.AbstractEnvironment;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertyResolver;
import org.springframework.core.env.*;
import com.alibaba.spring.context.config.ConfigurationBeanBinder;
import java.util.Map;
import static com.alibaba.spring.util.PropertySourcesUtils.getSubProperties;
import static org.apache.dubbo.spring.boot.util.DubboUtils.*;
import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
/**
* Dubbo Relaxed Binding Auto-{@link Configuration} for Spring Boot 2.0
......
......@@ -12,7 +12,7 @@
<artifactId>rest-admin-elasticjob</artifactId>
<properties>
<curator.version>4.2.0</curator.version>
<curator.version>2.12.0</curator.version>
<zookeeper.version>3.4.6</zookeeper.version>
</properties>
......@@ -36,12 +36,16 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>${curator.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>${curator.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
......
package org.apache.curator.framework.api;
/**
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*/
import org.apache.zookeeper.CreateMode;
public interface CreateBuilderMain extends
BackgroundPathAndBytesable<String>,
CreateModable<ACLBackgroundPathAndBytesable<String>>,
ACLCreateModeBackgroundPathAndBytesable<String>,
Compressible<CreateBackgroundModeStatACLable>,
Statable<CreateProtectACLCreateModePathAndBytesable<String>> {
/**
* Causes any parent nodes to get created if they haven't already been
*
* @return this
*/
public ProtectACLCreateModePathAndBytesable<String> creatingParentsIfNeeded();
//package org.apache.curator.framework.api;
//
///**
// * 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
// * <p>
// * http://www.apache.org/licenses/LICENSE-2.0
// * <p>
// * 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.
// */
//
//import org.apache.zookeeper.CreateMode;
//
//public interface CreateBuilderMain extends
// BackgroundPathAndBytesable<String>,
// CreateModable<ACLBackgroundPathAndBytesable<String>>,
// ACLCreateModeBackgroundPathAndBytesable<String>,
// Compressible<CreateBackgroundModeStatACLable>,
// Statable<CreateProtectACLCreateModePathAndBytesable<String>> {
// /**
// * Causes any parent nodes to get created if they haven't already been
// *
// * @return this
// */
// public ProtectACLCreateModePathAndBytesable<String> creatingParentsIfNeeded();
/**
* Causes any parent nodes to get created using {@link CreateMode#CONTAINER} if they haven't already been.
* IMPORTANT NOTE: container creation is a new feature in recent versions of ZooKeeper.
* If the ZooKeeper version you're using does not support containers, the parent nodes
* are created as ordinary PERSISTENT nodes.
*
* @return this
*/
public ProtectACLCreateModeStatPathAndBytesable<String> creatingParentContainersIfNeeded();
/**
* @return this
* @deprecated this has been generalized to support all create modes. Instead, use:
* <pre>
* client.create().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL)...
* </pre>
*/
@Deprecated
public ACLPathAndBytesable<String> withProtectedEphemeralSequential();
/**
* <p>
* Hat-tip to https://github.com/sbridges for pointing this out
* </p>
*
* <p>
* It turns out there is an edge case that exists when creating sequential-ephemeral
* nodes. The creation can succeed on the server, but the server can crash before
* the created node name is returned to the client. However, the ZK session is still
* valid so the ephemeral node is not deleted. Thus, there is no way for the client to
* determine what node was created for them.
* </p>
*
* <p>
* Even without sequential-ephemeral, however, the create can succeed on the sever
* but the client (for various reasons) will not know it.
* </p>
*
* <p>
* Putting the create builder into protection mode works around this.
* The name of the node that is created is prefixed with a GUID. If node creation fails
* the normal retry mechanism will occur. On the retry, the parent path is first searched
* for a node that has the GUID in it. If that node is found, it is assumed to be the lost
* node that was successfully created on the first try and is returned to the caller.
* </p>
*
* @return this
*/
public ACLCreateModeStatBackgroundPathAndBytesable<String> withProtection();
}
//
//// public ProtectACLCreateModePathAndBytesable<String> creatingParentsIfNeeded();
//
// /**
// * Causes any parent nodes to get created using {@link CreateMode#CONTAINER} if they haven't already been.
// * IMPORTANT NOTE: container creation is a new feature in recent versions of ZooKeeper.
// * If the ZooKeeper version you're using does not support containers, the parent nodes
// * are created as ordinary PERSISTENT nodes.
// *
// * @return this
// */
// public ProtectACLCreateModeStatPathAndBytesable<String> creatingParentContainersIfNeeded();
//
// /**
// * @return this
// * @deprecated this has been generalized to support all create modes. Instead, use:
// * <pre>
// * client.create().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL)...
// * </pre>
// */
// @Deprecated
// public ACLPathAndBytesable<String> withProtectedEphemeralSequential();
//
// /**
// * <p>
// * Hat-tip to https://github.com/sbridges for pointing this out
// * </p>
// *
// * <p>
// * It turns out there is an edge case that exists when creating sequential-ephemeral
// * nodes. The creation can succeed on the server, but the server can crash before
// * the created node name is returned to the client. However, the ZK session is still
// * valid so the ephemeral node is not deleted. Thus, there is no way for the client to
// * determine what node was created for them.
// * </p>
// *
// * <p>
// * Even without sequential-ephemeral, however, the create can succeed on the sever
// * but the client (for various reasons) will not know it.
// * </p>
// *
// * <p>
// * Putting the create builder into protection mode works around this.
// * The name of the node that is created is prefixed with a GUID. If node creation fails
// * the normal retry mechanism will occur. On the retry, the parent path is first searched
// * for a node that has the GUID in it. If that node is found, it is assumed to be the lost
// * node that was successfully created on the first try and is returned to the caller.
// * </p>
// *
// * @return this
// */
// public ACLCreateModeStatBackgroundPathAndBytesable<String> withProtection();
//}
//
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!