银川网站推广,wordpress设计模式,WordPress画表格,怎么申请小程序文章目录 依赖关键主要的程序启动文件配置文件bootstrap.yml依赖文件nacos配置中心上的文件截图 启动成功截图参考文档 依赖关键
SpringBoot版本和com.alibaba.cloud版本需要对应#xff0c;不然会程序会启动失败作者使用的版本
SpringBoot: 2.1.6.RELEASE
alibabacloud: 2.… 文章目录 依赖关键主要的程序启动文件配置文件bootstrap.yml依赖文件nacos配置中心上的文件截图 启动成功截图参考文档 依赖关键
SpringBoot版本和com.alibaba.cloud版本需要对应不然会程序会启动失败作者使用的版本
SpringBoot: 2.1.6.RELEASE
alibabacloud: 2.1.2.RELEASE主要的程序
启动文件
package com.example.user;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;/*** author ljj* date 2023/8/25 11:15* desc*/
SpringBootApplication
EnableDiscoveryClient
public class UserApplication {public static void main(String[] args) {SpringApplication.run(UserApplication.class, args);}}
配置文件bootstrap.yml
server:port: 8080
spring:application:name: user-testnamespace: test_projectjackson:date-format: yyyy-MM-dd HH:mm:sstime-zone: GMT8profiles:active: prodcloud:nacos:discovery:server-addr: localhost:8848username: nacospassword: nacos#只能填id不能填 namespace的名字namespace: test_projectconfig:name: ${spring.application.name}-${spring.profiles.active}server-addr: localhost:8848username: nacospassword: nacos#只能填id不能填 namespace的名字namespace: test_projectfile-extension: yml
依赖文件
?xml version1.0 encodingUTF-8?
project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdorg.example/groupIdartifactIdtest_project/artifactIdversion1.0-SNAPSHOT/versionpackagingpom/packagingmodulesmoduleuser/modulemoduleorder/modulemoduleproduct/module/modulesparentgroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-parent/artifactIdversion2.1.6.RELEASE/versionrelativePath/ !-- lookup parent from repository --/parentbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactId/plugin/plugins/buildpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-autoconfigure/artifactId/dependencydependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-discovery/artifactIdversion2.1.2.RELEASE/version/dependencydependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-config/artifactIdversion2.1.2.RELEASE/version/dependencydependencygroupIdorg.projectlombok/groupIdartifactIdlombok/artifactId/dependency/dependencies/projectnacos配置中心上的文件截图 启动成功截图 参考文档
Spring cloud alibaba 版本对应关系及说明