Browse Source

Misc changes
1. Upgrade maven plugin versions to fix error in Java 17
2. Fix potential issue in consumer management

Jason Song 2 years ago
parent
commit
4e000c54fe

+ 1 - 0
CHANGES.md

@@ -53,5 +53,6 @@ Apollo 2.0.0
 * [fix: javax.net.ssl.SSLHandshakeException: No appropriate protocol](https://github.com/apolloconfig/apollo/pull/4308)
 * [fix: javax.net.ssl.SSLHandshakeException: No appropriate protocol](https://github.com/apolloconfig/apollo/pull/4308)
 * [Upgrade flyway to 8.0.5](https://github.com/apolloconfig/apollo/pull/4312)
 * [Upgrade flyway to 8.0.5](https://github.com/apolloconfig/apollo/pull/4312)
 * [Broadcast ConfigChangeEvent using Spring ApplicationEvent](https://github.com/apolloconfig/apollo/pull/4305)
 * [Broadcast ConfigChangeEvent using Spring ApplicationEvent](https://github.com/apolloconfig/apollo/pull/4305)
+* [Upgrade maven plugin versions to fix error in Java 17](https://github.com/apolloconfig/apollo/pull/4333)
 ------------------
 ------------------
 All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1)
 All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1)

+ 1 - 0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ConsumerController.java

@@ -70,6 +70,7 @@ public class ConsumerController {
     return consumerService.generateAndSaveConsumerToken(createdConsumer, expires);
     return consumerService.generateAndSaveConsumerToken(createdConsumer, expires);
   }
   }
 
 
+  @PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
   @GetMapping(value = "/consumers/by-appId")
   @GetMapping(value = "/consumers/by-appId")
   public ConsumerToken getConsumerTokenByAppId(@RequestParam String appId) {
   public ConsumerToken getConsumerTokenByAppId(@RequestParam String appId) {
     return consumerService.getConsumerTokenByAppId(appId);
     return consumerService.getConsumerTokenByAppId(appId);

+ 2 - 0
apollo-portal/src/main/resources/static/scripts/controller/open/OpenManageController.js

@@ -106,6 +106,8 @@ function OpenManageController($scope, $translate, toastr, AppUtil, OrganizationS
                         token: $translate.instant('Open.Manage.AppNotCreated', { appId: $scope.consumer.appId })
                         token: $translate.instant('Open.Manage.AppNotCreated', { appId: $scope.consumer.appId })
                     };
                     };
                 }
                 }
+            }, function (response) {
+                AppUtil.showErrorMsg(response);
             });
             });
     }
     }
 
 

+ 9 - 8
pom.xml

@@ -73,15 +73,16 @@
 		<common-lang3.version>3.12.0</common-lang3.version>
 		<common-lang3.version>3.12.0</common-lang3.version>
 		<mysql-connector-java.version>8.0.28</mysql-connector-java.version>
 		<mysql-connector-java.version>8.0.28</mysql-connector-java.version>
 		<!-- Plugins Version -->
 		<!-- Plugins Version -->
-		<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
-		<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
-		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
-		<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
-		<maven-war-plugin.version>3.0.0</maven-war-plugin.version>
+		<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
+		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
+		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
+		<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
+		<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
 		<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
 		<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
 		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
 		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
-		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
-		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
+		<maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
+		<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
+		<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
 		<!-- for travis usage -->
 		<!-- for travis usage -->
 		<github.global.server>github</github.global.server>
 		<github.global.server>github</github.global.server>
 		<github.global.oauth2Token>${env.GITHUB_OAUTH_TOKEN}</github.global.oauth2Token>
 		<github.global.oauth2Token>${env.GITHUB_OAUTH_TOKEN}</github.global.oauth2Token>
@@ -441,7 +442,7 @@
 				<plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-assembly-plugin</artifactId>
 					<artifactId>maven-assembly-plugin</artifactId>
-					<version>2.6</version>
+					<version>${maven-assembly-plugin.version}</version>
 				</plugin>
 				</plugin>
 				<plugin>
 				<plugin>
 					<groupId>org.codehaus.mojo</groupId>
 					<groupId>org.codehaus.mojo</groupId>