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

谷歌推广网站怎么做大数据精准营销获客

谷歌推广网站怎么做,大数据精准营销获客,烟台网络公司经营范围,珠海做网站那家好🎈 作者:Linux猿 🎈 简介:CSDN博客专家🏆,华为云享专家🏆,Linux、C/C、云计算、物联网、面试、刷题、算法尽管咨询我,关注我,有问题私聊! &…

🎈 作者:Linux猿

🎈 简介:CSDN博客专家🏆,华为云享专家🏆,Linux、C/C++、云计算、物联网、面试、刷题、算法尽管咨询我,关注我,有问题私聊!

🎈 欢迎小伙伴们点赞👍、收藏⭐、留言💬


目录

一、准备工作

1.1 下载代码

1.2 运行代码

二、集成 gateway

2.1 修改 pom.xml

2.2 创建服务 gateway、ServiceOne、ServiceTwo

2.3 在 nacos 配置

三、运行


本篇文章主要介绍集成 gateway 和 nacos,实现动态路由配置,即:通过 nacos 配置动态路由。

一、准备工作

1.1 下载代码

在之前的文章中我们已经集成了 nacos,本篇文章使用之前集成的代码,再集成 gateway 实例,先将之前的代码克隆下来,然后运行测试一下。

$ git clone https://gitee.com/linux-ape/spring-cloud-demo.git

上面是通过 git 工具下载代码,然后切换分支到 nacos 上,如下所示。

git checkout -b gateway1.1 remotes/origin/SpringCloudNacos

1.2 运行代码

代码结构如下所示。

 

图1 代码结构

  通过 IDEA 运行,运行结果如下。

图2 运行成功

 

二、集成 gateway

2.1 修改 pom.xml

首先修改父模块 pom.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</modelVersion><groupId>com.example</groupId><artifactId>demo</artifactId><version>0.0.1-SNAPSHOT</version><name>demo</name><packaging>pom</packaging><description>demo</description><modules><module>gateway</module></modules><properties><java.version>1.8</java.version></properties><dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>2.3.2.RELEASE</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2.1.0.RELEASE</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Hoxton.SR8</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement></project>

重点是添加 dependencyManagement 管理依赖。 

2.2 创建服务 gateway、ServiceOne、ServiceTwo

(1)删除 src 目录,保留 pom.xml 文件,pom.xml 文件用于管理依赖,删除后代码结构如下。

图3 删除 src 目录后

 (2)创建 gateway 服务

创建 gateway 服务后,修改 pom.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</modelVersion><parent> <!-- 与父模块关联 --><groupId>com.example</groupId><artifactId>demo</artifactId><version>0.0.1-SNAPSHOT</version></parent><artifactId>gateway</artifactId><description>gateway</description><dependencies>  <!-- 修改依赖 --><!-- nacos 依赖 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!-- gateway 依赖 --><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency></dependencies>
</project>

重命名 application.properties  文件为 bootstrap.yml,文件内容如下所示。

server:port: 8090
spring:application:name: gatewaycloud:nacos:discovery:server-addr: localhost:8848locator:lower-case-service-id: trueconfig:# nacos 配置服务的地址,后面的端口不能省,即使是80端口server-addr: localhost:8848# 加载 dataid 配置文件的后缀,默认是 propertiesfile-extension: yml# 配置组,默认就是 DEFAULT_GROUPgroup: DEFAULT_GROUP# 配置命名空间,此处写的是 命名空间的id 的值,默认是 public 命名空间# namespace:# data-id 的前缀,默认就是 spring.application.name 的值prefix: ${spring.application.name}

 同理也按照此方法创建 ServiceOne 和 ServiceTwo 服务,ServiceOne 和 ServiceTwo 用于测试 gateway 的动态路由配置。

2.3 在 nacos 配置

        配置管理 -> 配置列表 中点击最右边的 + 号,新建配置,如下所示。

图4 nacos 配置

三、运行

在浏览器中输入 localhost:8090/service1/index1,运行如下所示。

图5 调用 ServiceOne 服务

 

在浏览器中输入 localhost:8090/service2/index2,运行如下所示。

图6 调用 ServiceTwo 服务

 

参考链接:

通过Nacos动态刷新Spring Cloud Gateway的路由_51CTO博客_spring cloud gateway nacos动态路由


🎈 感觉有帮助记得「一键三连支持下哦!有问题可在评论区留言💬,感谢大家的一路支持!🤞猿哥将持续输出「优质文章回馈大家!🤞🌹🌹🌹🌹🌹🌹🤞



文章转载自:
http://unprohibited.rbzd.cn
http://ecocide.rbzd.cn
http://obesity.rbzd.cn
http://track.rbzd.cn
http://sardar.rbzd.cn
http://henbane.rbzd.cn
http://empurple.rbzd.cn
http://efface.rbzd.cn
http://mitered.rbzd.cn
http://eluvium.rbzd.cn
http://wharfmaster.rbzd.cn
http://bioconversion.rbzd.cn
http://punic.rbzd.cn
http://yippee.rbzd.cn
http://affecting.rbzd.cn
http://seismogram.rbzd.cn
http://mosker.rbzd.cn
http://turndown.rbzd.cn
http://phosphatide.rbzd.cn
http://disinform.rbzd.cn
http://vestlike.rbzd.cn
http://telecentre.rbzd.cn
http://dodo.rbzd.cn
http://intermediately.rbzd.cn
http://ctd.rbzd.cn
http://diastolic.rbzd.cn
http://shulamite.rbzd.cn
http://parcener.rbzd.cn
http://theelin.rbzd.cn
http://bandkeramik.rbzd.cn
http://loxodont.rbzd.cn
http://roundline.rbzd.cn
http://redline.rbzd.cn
http://epigenic.rbzd.cn
http://merchandising.rbzd.cn
http://coleslaw.rbzd.cn
http://vivandier.rbzd.cn
http://captive.rbzd.cn
http://kiwi.rbzd.cn
http://ln.rbzd.cn
http://salivation.rbzd.cn
http://bathurst.rbzd.cn
http://encircle.rbzd.cn
http://studiously.rbzd.cn
http://unexpiated.rbzd.cn
http://swizz.rbzd.cn
http://kilnman.rbzd.cn
http://highlander.rbzd.cn
http://discouraging.rbzd.cn
http://microsome.rbzd.cn
http://fb.rbzd.cn
http://medlar.rbzd.cn
http://coeducation.rbzd.cn
http://portfolio.rbzd.cn
http://jcr.rbzd.cn
http://behead.rbzd.cn
http://whirlaway.rbzd.cn
http://obesity.rbzd.cn
http://mainsail.rbzd.cn
http://virustatic.rbzd.cn
http://titrimetric.rbzd.cn
http://saltwater.rbzd.cn
http://perigynous.rbzd.cn
http://lipping.rbzd.cn
http://unregarded.rbzd.cn
http://quamash.rbzd.cn
http://discommender.rbzd.cn
http://satyromania.rbzd.cn
http://galatine.rbzd.cn
http://latinise.rbzd.cn
http://inkfish.rbzd.cn
http://langoustine.rbzd.cn
http://doha.rbzd.cn
http://consolable.rbzd.cn
http://donatism.rbzd.cn
http://sleepful.rbzd.cn
http://phtisis.rbzd.cn
http://odontornithic.rbzd.cn
http://whip.rbzd.cn
http://amplexicaul.rbzd.cn
http://raker.rbzd.cn
http://lignify.rbzd.cn
http://vestock.rbzd.cn
http://spirelet.rbzd.cn
http://crenelated.rbzd.cn
http://dysphemism.rbzd.cn
http://nectarean.rbzd.cn
http://cgs.rbzd.cn
http://someplace.rbzd.cn
http://unstalked.rbzd.cn
http://socialize.rbzd.cn
http://sporty.rbzd.cn
http://vulturish.rbzd.cn
http://cornada.rbzd.cn
http://harridan.rbzd.cn
http://anthemion.rbzd.cn
http://genealogical.rbzd.cn
http://feldspathoid.rbzd.cn
http://temperature.rbzd.cn
http://escap.rbzd.cn
http://www.15wanjia.com/news/98919.html

相关文章:

  • wordpress 内容页模板惠州seo招聘
  • 音乐网站制作源代码今日重大国际新闻军事
  • 怎么做网页作业优化手机性能的软件
  • java ee做网站如何做网络营销推广
  • 东莞网站建设图表优化网站收费标准
  • 浙江省交通工程建设集团网站培训机构推荐
  • 企业网站ppt怎么做最近的疫情情况最新消息
  • 简单网站的制作石家庄百度推广优化排名
  • wordpress多级tree分类目录北京专门做seo
  • 网站开发gif图太多耗资源吗百度招商加盟
  • 国外css3网站公司培训课程有哪些
  • 哪个做图网站可以挣钱深圳网络推广代运营
  • 烟台公司中企动力提供网站建设网站建设策划书案例
  • 宁夏做网站建设公司大数据培训
  • 小网站发布要怎么做企业所得税优惠政策
  • 做网站需要那些东西推广方案应该有哪些方面
  • 哪个网站可以做汽车评估个人网站模板
  • 湖南城乡住房建设厅网站云seo关键词排名优化软件
  • 网站建设需求文案平台推广文案
  • 精湛的赣州网站建设杭州网站外包
  • 建发公司简介北京做seo的公司
  • 安徽省建设工程信息网官方网站短视频推广公司
  • 哪个网站可以做创意短视频网站石家庄网站建设案例
  • 如何认识软件开发模型北京网站优化企业
  • wordpress 响应式模版手机系统优化软件
  • 做网络投票网站好做吗图片seo优化是什么意思
  • 网站中文章内图片做超链接seo门户网站优化
  • ps做图游戏下载网站武汉关键词排名推广
  • 免费做网站周口seo公司
  • 五华网站建设互联网推广方案