Location>code7788 >text

nacos(5): Read the nacos configuration and implement dynamic refresh

Popularity:469 ℃/2025-02-14 11:07:49
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="/POM/4.0.0" xmlns:xsi="http:///2001/XMLSchema-instance" xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0."> <modelVersion>4.0.0</modelVersion> <groupId></groupId> <artifactId>springboot</artifactId> <version>0.0.1-SNAPSHOT</version> <name>springboot</name> <description>Demo project for Spring Boot</description> <packaging>jar</packaging> <properties> <>1.8</> <>UTF-8</> <>UTF-8</> <>2.7.6</> <>2021.0.5.0</> </properties> <dependencies> <!--springboot--> <dependency> <groupId></groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--Service Discovery (Producer)--> <dependency> <groupId></groupId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> </dependency> <!--consumer--> <dependency> <groupId></groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> <version>2.2.</version> </dependency> <dependency> <groupId></groupId> <artifactId>spring-cloud-starter-loadbalancer</artifactId> <version>3.1.5</version> </dependency> <!--Dynamic configuration--> <dependency> <groupId></groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> <version>2021.0.5.0</version> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId></groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId></groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>${}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId></groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId></groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${}</version> <configuration> <mainClass></mainClass> <skip>false</skip> </configuration> <executions> <execution> <id>repackage</id> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>