Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
architecture
/
glsx-archetype
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1d2dddc0
authored
Apr 25, 2023
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
框架完善-dubbo保持与公司版本一致,elasticjob与公司版本一致
1 parent
53b2c69a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
121 deletions
glsx-archetype-parent/rest-admin-job-archetype/pom.xml
rest-archetype-framework/pom.xml
rest-archetype-framework/rest-admin-alliance/pom.xml
rest-archetype-framework/rest-admin-dubbo/pom.xml
rest-archetype-framework/rest-admin-dubbo/src/main/java/com/glsx/plat/dubbo/config/DubboRelaxedBinding2AutoConfiguration.java
rest-archetype-framework/rest-admin-elasticjob/pom.xml
rest-archetype-framework/rest-admin-elasticjob/src/main/java/org/apache/curator/framework/api/CreateBuilderMain.java
rest-archetype-framework/rest-admin-elasticjob/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
glsx-archetype-parent/rest-admin-job-archetype/pom.xml
View file @
1d2dddc
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.target>
1.8
</maven.compiler.target>
<curator.version>
4.
2.0
</curator.version>
<curator.version>
2.1
2.0
</curator.version>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
...
@@ -44,11 +44,6 @@
...
@@ -44,11 +44,6 @@
<artifactId>
curator-client
</artifactId>
<artifactId>
curator-client
</artifactId>
<version>
${curator.version}
</version>
<version>
${curator.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-x-discovery
</artifactId>
<version>
${curator.version}
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
rest-archetype-framework/pom.xml
View file @
1d2dddc
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.target>
1.8
</maven.compiler.target>
<curator.version>
4.
2.0
</curator.version>
<curator.version>
2.1
2.0
</curator.version>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
...
@@ -88,11 +88,6 @@
...
@@ -88,11 +88,6 @@
<artifactId>
curator-client
</artifactId>
<artifactId>
curator-client
</artifactId>
<version>
${curator.version}
</version>
<version>
${curator.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-x-discovery
</artifactId>
<version>
${curator.version}
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
rest-archetype-framework/rest-admin-alliance/pom.xml
View file @
1d2dddc
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
<!-- <groupId>com.glsx</groupId>-->
<!-- <groupId>com.glsx</groupId>-->
<!-- <artifactId>rest-admin-sleuth</artifactId>-->
<!-- <artifactId>rest-admin-sleuth</artifactId>-->
<!-- </dependency>-->
<!-- </dependency>-->
<dependency
>
<!-- <dependency>--
>
<groupId>
com.glsx
</groupId
>
<!-- <groupId>com.glsx</groupId>--
>
<artifactId>
rest-admin-monitor
</artifactId
>
<!-- <artifactId>rest-admin-monitor</artifactId>--
>
</dependency
>
<!-- </dependency>--
>
<dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-gateway-client
</artifactId>
<artifactId>
rest-admin-gateway-client
</artifactId>
...
...
rest-archetype-framework/rest-admin-dubbo/pom.xml
View file @
1d2dddc
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<artifactId>
rest-admin-dubbo
</artifactId>
<artifactId>
rest-admin-dubbo
</artifactId>
<properties>
<properties>
<curator.version>
4.
2.0
</curator.version>
<curator.version>
2.1
2.0
</curator.version>
<dubbo.version>
2.7.7
</dubbo.version>
<dubbo.version>
2.7.7
</dubbo.version>
<zookeeper.version>
3.4.6
</zookeeper.version>
<zookeeper.version>
3.4.6
</zookeeper.version>
</properties>
</properties>
...
...
rest-archetype-framework/rest-admin-dubbo/src/main/java/com/glsx/plat/dubbo/config/DubboRelaxedBinding2AutoConfiguration.java
View file @
1d2dddc
package
com
.
glsx
.
plat
.
dubbo
.
config
;
package
com
.
glsx
.
plat
.
dubbo
.
config
;
import
static
com
.
alibaba
.
spring
.
util
.
PropertySourcesUtils
.
getSubProperties
;
import
com.alibaba.spring.context.config.ConfigurationBeanBinder
;
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
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.core.env.AbstractEnvironment
;
import
org.springframework.core.env.*
;
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
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
* Dubbo Relaxed Binding Auto-{@link Configuration} for Spring Boot 2.0
...
...
rest-archetype-framework/rest-admin-elasticjob/pom.xml
View file @
1d2dddc
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<artifactId>
rest-admin-elasticjob
</artifactId>
<artifactId>
rest-admin-elasticjob
</artifactId>
<properties>
<properties>
<curator.version>
4.
2.0
</curator.version>
<curator.version>
2.1
2.0
</curator.version>
<zookeeper.version>
3.4.6
</zookeeper.version>
<zookeeper.version>
3.4.6
</zookeeper.version>
</properties>
</properties>
...
@@ -36,12 +36,16 @@
...
@@ -36,12 +36,16 @@
<dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-framework
</artifactId>
<artifactId>
curator-framework
</artifactId>
<version>
${curator.version}
</version>
<exclusions>
<exclusion>
<groupId>
org.apache.zookeeper
</groupId>
<artifactId>
zookeeper
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-recipes
</artifactId>
<artifactId>
curator-recipes
</artifactId>
<version>
${curator.version}
</version>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
<groupId>
org.apache.zookeeper
</groupId>
<groupId>
org.apache.zookeeper
</groupId>
...
...
rest-archetype-framework/rest-admin-elasticjob/src/main/java/org/apache/curator/framework/api/CreateBuilderMain.java
View file @
1d2dddc
package
org
.
apache
.
curator
.
framework
.
api
;
//package org.apache.curator.framework.api;
//
/**
///**
* Licensed to the Apache Software Foundation (ASF) under one
// * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
// * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
// * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
// * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
// * to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
// * "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
// * with the License. You may obtain a copy of the License at
* <p>
// * <p>
* http://www.apache.org/licenses/LICENSE-2.0
// * http://www.apache.org/licenses/LICENSE-2.0
* <p>
// * <p>
* Unless required by applicable law or agreed to in writing,
// * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
// * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
// * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
// * specific language governing permissions and limitations
* under the License.
// * under the License.
*/
// */
//
import
org.apache.zookeeper.CreateMode
;
//import org.apache.zookeeper.CreateMode;
//
public
interface
CreateBuilderMain
extends
//public interface CreateBuilderMain extends
BackgroundPathAndBytesable
<
String
>,
// BackgroundPathAndBytesable<String>,
CreateModable
<
ACLBackgroundPathAndBytesable
<
String
>>,
// CreateModable<ACLBackgroundPathAndBytesable<String>>,
ACLCreateModeBackgroundPathAndBytesable
<
String
>,
// ACLCreateModeBackgroundPathAndBytesable<String>,
Compressible
<
CreateBackgroundModeStatACLable
>,
// Compressible<CreateBackgroundModeStatACLable>,
Statable
<
CreateProtectACLCreateModePathAndBytesable
<
String
>>
{
// Statable<CreateProtectACLCreateModePathAndBytesable<String>> {
/**
// /**
* Causes any parent nodes to get created if they haven't already been
// * Causes any parent nodes to get created if they haven't already been
*
// *
* @return this
// * @return this
*/
// */
public
ProtectACLCreateModePathAndBytesable
<
String
>
creatingParentsIfNeeded
();
// public ProtectACLCreateModePathAndBytesable<String> creatingParentsIfNeeded();
// public ProtectACLCreateModePathAndBytesable<String> creatingParentsIfNeeded();
//
/**
//// 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
// * Causes any parent nodes to get created using {@link CreateMode#CONTAINER} if they haven't already been.
* are created as ordinary PERSISTENT nodes.
// * 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
* @return this
// * are created as ordinary PERSISTENT nodes.
*/
// *
public
ProtectACLCreateModeStatPathAndBytesable
<
String
>
creatingParentContainersIfNeeded
();
// * @return this
// */
/**
// public ProtectACLCreateModeStatPathAndBytesable<String> creatingParentContainersIfNeeded();
* @return this
//
* @deprecated this has been generalized to support all create modes. Instead, use:
// /**
* <pre>
// * @return this
* client.create().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL)...
// * @deprecated this has been generalized to support all create modes. Instead, use:
* </pre>
// * <pre>
*/
// * client.create().withProtection().withMode(CreateMode.EPHEMERAL_SEQUENTIAL)...
@Deprecated
// * </pre>
public
ACLPathAndBytesable
<
String
>
withProtectedEphemeralSequential
();
// */
// @Deprecated
/**
// public ACLPathAndBytesable<String> withProtectedEphemeralSequential();
* <p>
//
* Hat-tip to https://github.com/sbridges for pointing this out
// /**
* </p>
// * <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
// * <p>
* the created node name is returned to the client. However, the ZK session is still
// * It turns out there is an edge case that exists when creating sequential-ephemeral
* valid so the ephemeral node is not deleted. Thus, there is no way for the client to
// * nodes. The creation can succeed on the server, but the server can crash before
* determine what node was created for them.
// * the created node name is returned to the client. However, the ZK session is still
* </p>
// * 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>
// * 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
// * <p>
* the normal retry mechanism will occur. On the retry, the parent path is first searched
// * Putting the create builder into protection mode works around this.
* for a node that has the GUID in it. If that node is found, it is assumed to be the lost
// * The name of the node that is created is prefixed with a GUID. If node creation fails
* node that was successfully created on the first try and is returned to the caller.
// * the normal retry mechanism will occur. On the retry, the parent path is first searched
* </p>
// * 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.
* @return this
// * </p>
*/
// *
public
ACLCreateModeStatBackgroundPathAndBytesable
<
String
>
withProtection
();
// * @return this
}
// */
// public ACLCreateModeStatBackgroundPathAndBytesable<String> withProtection();
//}
//
rest-archetype-framework/rest-admin-elasticjob/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
View file @
1d2dddc
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment