code modify.
diff --git a/pom.xml b/pom.xml
index 0872582..a28a711 100644
--- a/pom.xml
+++ b/pom.xml
@@ -307,7 +307,21 @@
</execution>
</executions>
</plugin>
- -->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>-->
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -321,19 +335,7 @@
</execution>
</executions>
</plugin>
- <!-- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10.3</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>-->
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/soul-client/pom.xml b/soul-client/pom.xml
index a08a32b..f8be530 100644
--- a/soul-client/pom.xml
+++ b/soul-client/pom.xml
@@ -71,20 +71,42 @@
</dependencyManagement>
<distributionManagement>
- <repository>
- <id>releases</id>
- <name>Nexus Release Repository</name>
- <url>http://47.97.160.249:8081/repository/maven-releases/</url>
- </repository>
<snapshotRepository>
- <id>snapshots</id>
- <name>Nexus Snapshot Repository</name>
- <url>http://47.97.160.249:8081/repository/maven-snapshots/</url>
+ <id>ossrh</id>
+ <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
+ <repository>
+ <id>ossrh</id>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
</distributionManagement>
<build>
<plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.3</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>ossrh</serverId>
+ <nexusUrl>https://oss.sonatype.org/</nexusUrl>
+ <autoReleaseAfterClose>true</autoReleaseAfterClose>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -98,6 +120,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
diff --git a/soul-client/soul-client-common/src/main/java/org/dromara/soul/client/common/utils/OkHttpTools.java b/soul-client/soul-client-common/src/main/java/org/dromara/soul/client/common/utils/OkHttpTools.java
index 7ecd52e..b1e314a 100644
--- a/soul-client/soul-client-common/src/main/java/org/dromara/soul/client/common/utils/OkHttpTools.java
+++ b/soul-client/soul-client-common/src/main/java/org/dromara/soul/client/common/utils/OkHttpTools.java
@@ -18,7 +18,6 @@
package org.dromara.soul.client.common.utils;
import com.google.gson.Gson;
-import okhttp3.FormBody;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
@@ -65,27 +64,6 @@
}
/**
- * Build post request.
- *
- * @param url the url
- * @param params the params
- * @return the request
- */
- private Request buildPost(String url, Map<String, String> params) {
- FormBody.Builder formBuilder = new FormBody.Builder();
- if (params != null) {
- for (String key : params.keySet()) {
- formBuilder.add(key, params.get(key));
- }
- }
- return new Request.Builder()
- .url(url)
- .addHeader("Content-Type", "application/json; charset=utf-8")
- .post(formBuilder.build())
- .build();
- }
-
- /**
* Post string.
*
* @param url the url
@@ -134,7 +112,7 @@
* @return the string
* @throws IOException the io exception
*/
- public String post(String url, Map<String, String> params) throws IOException {
+ public String post(final String url, final Map<String, String> params) throws IOException {
String json = GOSN.toJson(params);
RequestBody body = RequestBody.create(JSON, json);
Request request = new Request.Builder()
@@ -144,9 +122,14 @@
return client.newCall(request).execute().body().string();
}
+ /**
+ * Gets gosn.
+ *
+ * @return the gosn
+ */
public Gson getGosn() {
return GOSN;
}
-
}
+
diff --git a/soul-web/src/main/java/org/dromara/soul/web/support/XForwardedRemoteAddressResolver.java b/soul-web/src/main/java/org/dromara/soul/web/support/XForwardedRemoteAddressResolver.java
index 762b531..9e7d424 100644
--- a/soul-web/src/main/java/org/dromara/soul/web/support/XForwardedRemoteAddressResolver.java
+++ b/soul-web/src/main/java/org/dromara/soul/web/support/XForwardedRemoteAddressResolver.java
@@ -38,9 +38,6 @@
* meets your security requirements.
*
* @author Andrew Fitzgerald
- * @see <a href=
- * "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For
- * reference</a>
*/
public class XForwardedRemoteAddressResolver implements RemoteAddressResolver {
@@ -82,15 +79,6 @@
* should use a value of `1` for the `maxTrustedIndex`.
* Given the X-Forwarded-For value of [0.0.0.1, 0.0.0.2, 0.0.0.3]:
*
- * <pre>
- * maxTrustedIndex -> result
- *
- * [MIN_VALUE,0] -> IllegalArgumentException
- * 1 -> 0.0.0.3
- * 2 -> 0.0.0.2
- * 3 -> 0.0.0.1
- * [4, MAX_VALUE] -> 0.0.0.1
- * </pre>
*
* @param maxTrustedIndex correlates to the number of trusted proxies expected in
* front of Spring Cloud Gateway (index starts at 1).