常用的网页开发工具有哪些,丹东seo营销,刚刚地震最新消息今天 刚才,wordpress第三方登陆前言#xff1a;前两天公司接到客户提供的一个微服务框架#xff0c;导师让我在本地部署验证一下该框架的可用性#xff0c;借此机会记录一下微服务项目的一个基本部署流程#xff0c;仅供学习参考#xff0c;如有不足还请指正#xff01; 文件结构
提供的压缩文件共包含… 前言前两天公司接到客户提供的一个微服务框架导师让我在本地部署验证一下该框架的可用性借此机会记录一下微服务项目的一个基本部署流程仅供学习参考如有不足还请指正 文件结构
提供的压缩文件共包含源码、Maven配置信息以及一份框架说明 部署过程
1、修改Maven信息
打开源码后先将Maven修改为框架提供的Maven配置文件修改后需刷新Maven 附Maven配置源码供参考该项目主要采用阿里云组件库
?xml version1.0 encodingUTF-8?
settings xmlnshttp://maven.apache.org/SETTINGS/1.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsdmirrorsmirroridmirror/idmirrorOfcentral,jcenter,!rdc-releases,!rdc-snapshots/mirrorOfnamemirror/nameurlhttps://maven.aliyun.com/nexus/content/groups/public/url/mirror/mirrorsserversserveridrdc-releases/idusername64423e0f253e98e0c616d548/usernamepasswordcFMOPZMySW7I/password/serverserveridrdc-snapshots/idusername64423e0f253e98e0c616d548/usernamepasswordcFMOPZMySW7I/password/server/serversprofilesprofileidrdc/idpropertiesaltReleaseDeploymentRepositoryrdc-releases::default::https://packages.aliyun.com/maven/repository/2260349-release-dYnJeL//altReleaseDeploymentRepositoryaltSnapshotDeploymentRepositoryrdc-snapshots::default::https://packages.aliyun.com/maven/repository/2260349-snapshot-x4T8Ra//altSnapshotDeploymentRepository/propertiesrepositoriesrepositoryidcentral/idurlhttps://maven.aliyun.com/nexus/content/groups/public/urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/repositoryrepositoryidsnapshots/idurlhttps://maven.aliyun.com/nexus/content/groups/public/urlreleasesenabledfalse/enabled/releasessnapshotsenabledtrue/enabled/snapshots/repositoryrepositoryidrdc-releases/idurlhttps://packages.aliyun.com/maven/repository/2260349-release-dYnJeL//urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/repositoryrepositoryidrdc-snapshots/idurlhttps://packages.aliyun.com/maven/repository/2260349-snapshot-x4T8Ra//urlreleasesenabledfalse/enabled/releasessnapshotsenabledtrue/enabled/snapshots/repository/repositoriespluginRepositoriespluginRepositoryidcentral/idurlhttps://maven.aliyun.com/nexus/content/groups/public/urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/pluginRepositorypluginRepositoryidsnapshots/idurlhttps://maven.aliyun.com/nexus/content/groups/public/urlreleasesenabledfalse/enabled/releasessnapshotsenabledtrue/enabled/snapshots/pluginRepositorypluginRepositoryidrdc-releases/idurlhttps://packages.aliyun.com/maven/repository/2260349-release-dYnJeL//urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/pluginRepositorypluginRepositoryidrdc-snapshots/idurlhttps://packages.aliyun.com/maven/repository/2260349-snapshot-x4T8Ra//urlreleasesenabledfalse/enabled/releasessnapshotsenabledtrue/enabled/snapshots/pluginRepository/pluginRepositories/profile/profilesactiveProfilesactiveProfilerdc/activeProfile/activeProfiles
/settings
2、框架结构
该框架主要包括gateway网关、uaa认证系统、platform基础平台、plugin功能组件四大部分可根据需要部署使用。 3、初始化数据库
将源码中doc/sq文件夹下的SQL导入本地数据库 navicat中新建数据库marscloud字符集参考sql文件中字符集utf8mb4 导入结果 4、初始化nacos nacos 配置文件在doc/nacos 目录下在 nacos 控制台导入目录下的 yaml 文件 首先启动本地nacos 在nacos新建命名空间marscloud 导入yaml文件可以现将所有yaml文件压缩为zip然后再导入 导入结果
5、修改nacos中的连接信息 主要是修改Redis和MySQL的连接信息 Redis可以修改为自己服务器MySQL为刚刚我们新建的本地marscloud数据库。修改后记得发布【手动狗头】
6、修改项目中nacos的连接信息 通常情况下nacos连接信息在项目的bootstrap.yml文件夹中但该框架无bootstrap.yml文件而是配置项目启动的环境变量每个微服务模块启动的环境变量都需要修改以下为idea中的操作。 启动时的环境变量如下其中 NACOS_GROUPNACOS_NAMESPACE 表示配置所在的组和命名空间NACOS_URL 表示 nacos 连接地址根据实际连接信息替换 Active profiles 为当前使用的配置环境 NACOS_GROUPDEFAULT_GROUP;NACOS_NAMESPACEmarscloud;NACOS_URLlocalhost:8848
完成以上步骤后即可正常启动
Other 可能会出现的异常
若启动报错如下说明未连接到nacos需检查启动时的环境变量。 验证测试 根据以上操作启动gateway、system、uaa三个模块 使用apifox获取图片验证码进行测试正常获取验证码即项目后端部署完成10002为网关端口 Other 可能会出现的异常
若接口请求测试时出现以下异常则可能是jdk版本导致将jdk版本切换为1.8即可 Over