-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:support spring cloud version auto-detection.
- Loading branch information
1 parent
e20227b
commit 4b0778b
Showing
2 changed files
with
90 additions
and
92 deletions.
There are no files selected for viewing
148 changes: 74 additions & 74 deletions
148
...ng-cloud-plugins-examples/spring-cloud-2023-examples/quickstart-examples/provider/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.2.3</version> | ||
<relativePath/> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.2.3</version> | ||
<relativePath/> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<name>2023-provider</name> | ||
<description>Demo Provider Project For Spring Cloud Alibaba 2023</description> | ||
<artifactId>polaris-javaagent-demo-sc-quickstart-2023-provider</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.7.0</version> | ||
<name>2023-provider</name> | ||
<description>Demo Provider Project For Spring Cloud Alibaba 2023</description> | ||
<artifactId>polaris-javaagent-demo-sc-quickstart-2023-provider</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.7.0</version> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-alibaba-dependencies</artifactId> | ||
<version>2023.0.0.0-RC1</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-alibaba-dependencies</artifactId> | ||
<version>2023.0.0.0-RC1</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-dependencies</artifactId> | ||
<version>2023.0.0</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-dependencies</artifactId> | ||
<version>2023.0.0</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<!-- 简单的 Spring Cloud Web 依赖 --> | ||
<!-- <dependency>--> | ||
<!-- <groupId>org.springframework.cloud</groupId>--> | ||
<!-- <artifactId>spring-cloud-starter-bootstrap</artifactId>--> | ||
<!-- </dependency>--> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependencies> | ||
<!-- 简单的 Spring Cloud Web 依赖 --> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-bootstrap</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
|
||
<!-- 引入 Spring Cloud Alibaba 的服务注册发现依赖 --> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> | ||
</dependency> | ||
<!-- 引入 Spring Cloud Alibaba 的服务注册发现依赖 --> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<configuration> | ||
<executable>true</executable> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<configuration> | ||
<executable>true</executable> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
34 changes: 16 additions & 18 deletions
34
...-cloud-2023-examples/quickstart-examples/provider/src/main/resources/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
#server.port=65001 | ||
#spring.application.name=service-provider-2022 | ||
#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 | ||
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 | ||
#spring.cloud.nacos.config.enabled=true | ||
#spring.cloud.nacos.discovery.enabled=true | ||
##spring.cloud.nacos.discovery.instance-enabled=true | ||
##only register IPv4 instance | ||
##spring.cloud.nacos.discovery.ip-type=IPv4 | ||
##only register IPv6 instance | ||
##spring.cloud.nacos.discovery.ip-type=IPv6 | ||
# | ||
#spring.cloud.nacos.username=nacos | ||
#spring.cloud.nacos.password=nacos | ||
# | ||
#management.endpoints.web.exposure.include=* | ||
#management.endpoint.health.show-details=always | ||
#spring.main.allow-circular-references=true | ||
server.port=65001 | ||
spring.application.name=service-provider-2022 | ||
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 | ||
spring.cloud.nacos.config.server-addr=127.0.0.1:8848 | ||
spring.cloud.nacos.config.enabled=true | ||
spring.cloud.nacos.discovery.enabled=true | ||
#spring.cloud.nacos.discovery.instance-enabled=true | ||
#only register IPv4 instance | ||
#spring.cloud.nacos.discovery.ip-type=IPv4 | ||
#only register IPv6 instance | ||
#spring.cloud.nacos.discovery.ip-type=IPv6 | ||
spring.cloud.nacos.username=nacos | ||
spring.cloud.nacos.password=nacos | ||
management.endpoints.web.exposure.include=* | ||
management.endpoint.health.show-details=always | ||
spring.main.allow-circular-references=true |