nacos配置中心

bootstrap.yaml


server:

port:8403

spring:

application:

name: provider

cloud:

nacos:

discovery:

server-addr: localhost:8848

config:

server-addr: localhost:8848

file-extension: yaml

group: devGroup

namespace: c14f418f-bede-4627-a15b-799595757619



application.yaml


spring:

profiles:

active: dev


xml


<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0

        <groupId>org.springframework.boot

        <artifactId>spring-boot-starter-parent

        <version>2.2.1.RELEASE

        <relativePath/>

    <groupId>com.example

    <artifactId>nacosDemo

    <version>0.0.1-SNAPSHOT

    <name>nacosDemo

    <description>nacosDemo

            <groupId>org.springframework.boot

            <artifactId>spring-boot-starter

            <groupId>org.springframework.boot

            <artifactId>spring-boot-starter-web

            <groupId>org.springframework.boot

            <artifactId>spring-boot-starter-test

            <scope>test

                    <groupId>org.junit.vintage

                    <artifactId>junit-vintage-engine

            <groupId>com.alibaba.cloud

            <artifactId>spring-cloud-starter-alibaba-nacos-discovery

            <version>2.2.1.RELEASE

            <groupId>com.alibaba.cloud

            <artifactId>spring-cloud-starter-alibaba-nacos-config

            <version>2.2.1.RELEASE

                <groupId>org.springframework.boot

                <artifactId>spring-boot-maven-plugin

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容