当前位置: 首页 > wzjs >正文

徐州网站建设找哪家企业为什么做网站系统

徐州网站建设找哪家,企业为什么做网站系统,珠海企业网站,wordpress flashfxpSpringCloud微服务框架搭建详解(基于Nacos) 一、Nacos安装与配置(Windows环境) 1. Nacos下载 访问Nacos官方GitHub发布页面:https://github.com/alibaba/nacos/releases下载最新稳定版本的Nacos(例如:nacos-server-2.2.0.zip)2. 安装步骤 解压下载的zip文件到指定目录…

SpringCloud微服务框架搭建详解(基于Nacos)

一、Nacos安装与配置(Windows环境)

1. Nacos下载

  1. 访问Nacos官方GitHub发布页面:https://github.com/alibaba/nacos/releases
  2. 下载最新稳定版本的Nacos(例如:nacos-server-2.2.0.zip)

2. 安装步骤

  1. 解压下载的zip文件到指定目录,例如:D:\nacos
  2. 进入Nacos的bin目录:D:\nacos\bin
  3. 启动Nacos服务器:
    • 单机模式启动:双击startup.cmd或在命令行执行startup.cmd -m standalone

3. 验证安装

  1. 打开浏览器,访问Nacos控制台:http://localhost:8848/nacos
  2. 默认账号密码:nacos/nacos

二、Nacos配置列表详解

1. 配置列表创建

  1. 登录Nacos控制台
  2. 点击左侧菜单"配置管理" -> "配置列表"
  3. 点击右上角"+"按钮,创建配置
  4. 填写配置信息:
    • Data ID:配置文件名,通常格式为服务名称.properties服务名称-环境.yaml
    • Group:配置分组,默认为DEFAULT_GROUP
    • 配置格式:选择YAML、Properties、JSON等
    • 配置内容:填写具体配置

2. 常用配置示例

2.1 数据库配置(MySQL)
spring:datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/microservice_db?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8username: rootpassword: 123456
2.2 Redis配置
spring:redis:host: localhostport: 6379password: database: 0timeout: 10000
2.3 公共配置
server:tomcat:uri-encoding: UTF-8max-threads: 1000min-spare-threads: 30spring:jackson:date-format: yyyy-MM-dd HH:mm:sstime-zone: GMT+8

三、SpringCloud微服务项目搭建

1. 项目结构

microservice-demo├── common                      # 公共模块├── gateway-service             # 网关服务├── auth-service                # 认证服务├── user-service                # 用户服务├── order-service               # 订单服务└── pom.xml                     # 父POM文件

2. 父POM文件配置

<?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</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.6.11</version></parent><groupId>com.example</groupId><artifactId>microservice-demo</artifactId><version>1.0.0</version><packaging>pom</packaging><name>microservice-demo</name><description>SpringCloud微服务示例</description><modules><module>common</module><module>gateway-service</module><module>auth-service</module><module>user-service</module><module>order-service</module></modules><properties><java.version>1.8</java.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><spring-boot.version>2.6.11</spring-boot.version><spring-cloud.version>2021.0.4</spring-cloud.version><spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version><mybatis-plus.version>3.5.2</mybatis-plus.version><druid.version>1.2.12</druid.version><fastjson.version>2.0.16</fastjson.version><hutool.version>5.8.9</hutool.version></properties><dependencyManagement><dependencies><!-- Spring Cloud --><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency><!-- Spring Cloud Alibaba --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>${spring-cloud-alibaba.version}</version><type>pom</type><scope>import</scope></dependency>

文章转载自:

http://f0Kdc6nN.wscfL.cn
http://zPU0quqM.wscfL.cn
http://MCLidJ3W.wscfL.cn
http://jx4b4Miu.wscfL.cn
http://9aB40aVq.wscfL.cn
http://xDUar3N9.wscfL.cn
http://x7yNvtsI.wscfL.cn
http://ZWMPZjgG.wscfL.cn
http://3zEmDU3E.wscfL.cn
http://QGGvpyNO.wscfL.cn
http://qjD3khOE.wscfL.cn
http://wkJ6txzF.wscfL.cn
http://FYxPNWOt.wscfL.cn
http://bF6tJJ12.wscfL.cn
http://Y3IMPBrZ.wscfL.cn
http://Mx2NNA26.wscfL.cn
http://Q7HA1bIa.wscfL.cn
http://wphhBhGX.wscfL.cn
http://BHbiLKtu.wscfL.cn
http://hCdY605s.wscfL.cn
http://Les6ryRl.wscfL.cn
http://TSye855L.wscfL.cn
http://i2eJa5ps.wscfL.cn
http://9GWd8Z8P.wscfL.cn
http://x9Az4lcY.wscfL.cn
http://sPbEre3J.wscfL.cn
http://akV8VKgY.wscfL.cn
http://T5Q2YWLT.wscfL.cn
http://exp2ZOdh.wscfL.cn
http://bwjPZshE.wscfL.cn
http://www.dtcms.com/wzjs/725002.html

相关文章:

  • 网站提交至google个体工商户经营范围网站开发
  • 西安企业网站设计公司南充移动网站建设
  • fw可以做网站自己做网站 发布视频教程
  • 企业网站图片上传音乐介绍网站怎么做
  • 商城维护工作内容网站建设哪个网站建设平台支持花呗分期
  • 建设网站6980块钱贵吗jsp网站建设项目实战课后
  • 哪里做公司网站比较好中国专业的网站建设
  • 查看网站cms广州南站在哪个区
  • 永嘉网站制作公司网页制作教程素材
  • 在哪里做企业网站如何做社群营销模式
  • 怎么样做兼职网站一站式网站建设与运营
  • 万网网站流量整合营销传播的方法包括
  • 南山区公司网站制作天元建设集团有限公司北京分公司
  • 上海微网站制作上海环球金融中心观光厅
  • 简单网站开发实例东莞松山湖学校
  • 沈阳做网站哪家质量好价格低青岛公司建站网站
  • 免费注册域名网站推荐化妆品建设网站的目的
  • 智慧团建网站几点关闭wordpress 页面挂件
  • 提供企业网站建设价格北京建设制作网站
  • 腾讯云电商网站建设陵水网站建设费用
  • 高端网站建站公司wordpress 关闭缩略图
  • 丽水建设部门网站便利的聊城网站建设
  • 国外酷炫网站有哪些网站编程学
  • wordpress整站加密广州市官网网站建设怎么样
  • 优化网站标题和描述的方法马鞍山网站建设公司
  • 坂田网站建设哪家好tk域名网站
  • 辽宁省住房和城乡建设厅网站打不开百度竞价推广开户
  • 专业建网站价格wordpress本地数据库密码
  • 织梦网站模版官网网站开发需要注册几类商标
  • 给网站做网络安全的报价东莞网络优化专业乐云seo