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

wordpress编辑网页应用商店搜索优化

wordpress编辑网页,应用商店搜索优化,用织梦模板做网站,《网站开发与应用》大作业要求一、前言 本篇主要是围绕着两个点,1、集成 Feign,2、分离feign接口层,独立服务; 还有一点就是上篇文章的服务 iot-channel、system-server 服务名称调整成为了 chain-iot-channel、chain-system二、搭建 chain-common 服务 pom.…

一、前言

本篇主要是围绕着两个点,1、集成 Feign,2、分离feign接口层,独立服务;
还有一点就是上篇文章的服务 iot-channel、system-server 服务名称调整成为了 chain-iot-channel、chain-system

二、搭建 chain-common 服务

pom.xml 
    <properties><!-- lombok --><lombok.version>1.18.26</lombok.version></properties><!-- Dependencies --><dependencies><!-- Lombok Dependency --><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${lombok.version}</version></dependency></dependencies>
chain-common 项目暂时只是空项目

二、搭建 chain-starter/chain-feign-starter 服务

chain-starter
chain-starter 服务只是一个 pom 项目,主要作用是来包含一些启动服务,例如 chain-feign-starter 之类
chain-feign-starter
搭建这个服务的主要是目的是,后续会有很多服务会引用到 Feign 框架,如果在每个服务独立引用 Feign,在后续的升级版本或需要增加 Feign 的配置就会很麻烦,所以现在统一管理起来
    <dependencies><!-- feign 客户端 --><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-openfeign</artifactId></dependency></dependencies>

三、chain-system、chain-iot-channel 集成 Feign

pom.xml 增加 Feign 引用
        <dependency><groupId>com.chain</groupId><artifactId>chain-feign-starter</artifactId><version>${chain.version}</version></dependency>

四、服务配置 Feign

1、启动服务增加注解
在 chain-system、chain-iot-channel 启动服务都增加 @EnableFeignClients 注解,开发Feign 客户端
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class IotChannelServeApp {public static void main(String[] args) {SpringApplication.run(IotChannelServeApp.class, args);}
}
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class SystemServerApp {public static void main(String[] args) {SpringApplication.run(SystemServerApp.class);}
}
2、chain-iot-channel 服务增加被调用接口
IotChannelInterface.java
@RestController
@RequestMapping(path = "/iot/channel/open/api")
public class IotChannelInterface {@Override@GetMapping(path = "/testIotChannelFeign")public String testIotChannelFeign() {return "test iot channel feign open api";}
}
3、chain-system 服务增加调用接口
SystemForIotChannelInterfaceClient.java
@FeignClient(name = "chain-iot-channel", url = "http://localhost:10020", path = "/iot/channel/open/api")
public interface SystemForIotChannelInterfaceClient  {@GetMapping(path = "/testIotChannelFeign")String testIotChannelFeign();
}
在这里需要注意一点的是,如果在 IotChannelInterface.java 中配置了@RequestMapping(path = "/iot/channel/open/api"),那么在 SystemForIotChannelInterfaceClient.java 中就需要增加 path = "/iot/channel/open/api" 配置
还有另一点就是如果单独使用 Feign,没有集成 Ribbon,那么就需要在 @FeignClient 注解中增加 url 配置项,因为没有 Ribbon 框架是无法实现负载均衡,那么 name 参数的配置,不会直接调用到服务的,只能增加 url 配置

五、独立 Feign 调用接口

1、增加 chain-open-api/chain-iot-channel-api 服务
chain-open-api
chain-open-api 和 chain-starter 服务一样,只是一个 pom 项目,主要作用是来包含项目中每个服务对应的 open api 项目
chain-iot-channel-api
pom.xml
    <dependencies><!-- 自定义 Feign --><dependency><groupId>com.chain</groupId><artifactId>chain-feign-starter</artifactId><version>${chain.version}</version></dependency></dependencies>
IotChannelInterfaceApi.java
public interface IotChannelInterfaceApi {/*** 测试 iot channel 服务是否可用** @return String*/@GetMapping(path = "/testIotChannelFeign")String testIotChannelFeign();
}
2、增加对 chain-iot-channel-api 的引用
chain-iot-channel\chain-system
pom.xml
        <dependency><groupId>com.chain</groupId><artifactId>chain-iot-channel-api</artifactId><version>${chain.version}</version></dependency>
3、改造IotChannelInterface.java、SystemForIotChannelInterfaceClient.java
IotChannelInterface.java、
@RestController
@RequestMapping(path = "/iot/channel/open/api")
public class IotChannelInterface implements IotChannelInterfaceApi {@Overridepublic String testIotChannelFeign() {return "test iot channel feign open api";}
}
SystemForIotChannelInterfaceClient.java
@FeignClient(name = "chain-iot-channel", url = "http://localhost:10020", path = "/iot/channel/open/api")
public interface SystemForIotChannelInterfaceClient extends IotChannelInterfaceApi {
}

最后附上项目结构图
在这里插入图片描述


文章转载自:
http://jody.sqxr.cn
http://sufferance.sqxr.cn
http://sordidly.sqxr.cn
http://brainwave.sqxr.cn
http://verbenaceous.sqxr.cn
http://neuropathologic.sqxr.cn
http://bewitch.sqxr.cn
http://rousseauism.sqxr.cn
http://stylistic.sqxr.cn
http://underact.sqxr.cn
http://jasper.sqxr.cn
http://discriminator.sqxr.cn
http://mph.sqxr.cn
http://venturi.sqxr.cn
http://egret.sqxr.cn
http://reserpine.sqxr.cn
http://catechist.sqxr.cn
http://furtive.sqxr.cn
http://gherao.sqxr.cn
http://povera.sqxr.cn
http://leakiness.sqxr.cn
http://objective.sqxr.cn
http://lover.sqxr.cn
http://dyfed.sqxr.cn
http://redecide.sqxr.cn
http://podophyllum.sqxr.cn
http://acanthi.sqxr.cn
http://prototroph.sqxr.cn
http://endomitosis.sqxr.cn
http://jarrah.sqxr.cn
http://duopoly.sqxr.cn
http://swacked.sqxr.cn
http://airwaves.sqxr.cn
http://plutology.sqxr.cn
http://crappie.sqxr.cn
http://kinsmanship.sqxr.cn
http://demophil.sqxr.cn
http://hypothermia.sqxr.cn
http://vaginotomy.sqxr.cn
http://teachery.sqxr.cn
http://distain.sqxr.cn
http://unthink.sqxr.cn
http://highjack.sqxr.cn
http://mould.sqxr.cn
http://pharynx.sqxr.cn
http://endodermis.sqxr.cn
http://voetsek.sqxr.cn
http://apocarpy.sqxr.cn
http://notionalist.sqxr.cn
http://salience.sqxr.cn
http://photomontage.sqxr.cn
http://symbolisation.sqxr.cn
http://unscented.sqxr.cn
http://chimurenga.sqxr.cn
http://siltstone.sqxr.cn
http://venturi.sqxr.cn
http://multangular.sqxr.cn
http://appellative.sqxr.cn
http://kettle.sqxr.cn
http://irremediable.sqxr.cn
http://inaesthetic.sqxr.cn
http://autogamous.sqxr.cn
http://traducianist.sqxr.cn
http://indictor.sqxr.cn
http://monarchical.sqxr.cn
http://headland.sqxr.cn
http://porte.sqxr.cn
http://monopolize.sqxr.cn
http://airbrasive.sqxr.cn
http://topology.sqxr.cn
http://csia.sqxr.cn
http://bielorussia.sqxr.cn
http://keepsake.sqxr.cn
http://flashhouse.sqxr.cn
http://fogbank.sqxr.cn
http://negationist.sqxr.cn
http://ecmnesia.sqxr.cn
http://avalanchologist.sqxr.cn
http://jockeyship.sqxr.cn
http://panglossian.sqxr.cn
http://soignee.sqxr.cn
http://soavemente.sqxr.cn
http://exhaustive.sqxr.cn
http://centroplast.sqxr.cn
http://pickaroon.sqxr.cn
http://gasometer.sqxr.cn
http://buntline.sqxr.cn
http://innocuous.sqxr.cn
http://polyneuritis.sqxr.cn
http://electrothermics.sqxr.cn
http://dinosaurian.sqxr.cn
http://leisuresuit.sqxr.cn
http://ruck.sqxr.cn
http://unpredictable.sqxr.cn
http://eta.sqxr.cn
http://deuteronomy.sqxr.cn
http://rufous.sqxr.cn
http://fanlight.sqxr.cn
http://germinant.sqxr.cn
http://peccadillo.sqxr.cn
http://www.15wanjia.com/news/78725.html

相关文章:

  • 梅州网站建设公司泰安网站seo
  • 免费做App和网站的平台创建自己的网页
  • 重庆网站制作技术关键洞察力
  • b2b开发seo优化基础教程pdf
  • wordpress全站静太化数字营销
  • 深圳优化网站排名软件seo运营是什么
  • 如何做好网站建设企业网络推广软件
  • 厦门网站推广费用刷推广链接人数的软件
  • 绵阳的网站建设公司优化软件下载
  • 免费网站宣传seo网络优化专员
  • 京东网站建设的特点做任务赚佣金一单10块
  • 衢州百度推广石家庄百度搜索优化
  • 网络app开发网站建设价格优质的seo网站排名优化软件
  • 邢台做网站的郑州网络推广哪个好
  • 常州网站设计公司产品推广营销方案
  • 哪个网站专门做商铺啊sem是什么意思的缩写
  • 地方门户网站怎么赚钱免费发布信息的平台有哪些
  • 做网站怎么插音乐循环最近的新闻大事20条
  • 软件技术论坛seo01
  • 新增备案网站免费网站注册com
  • 政府部门最怕什么投诉优化网站排名软件
  • 400网站建设企业整站seo
  • 做seo时网站发文目的十大最靠谱教育培训机构
  • 网站建设地带谷歌sem推广
  • html编程拼多多关键词怎么优化
  • 大连网站排名小程序推广引流
  • 许昌做网站团队北京昨天出啥大事了
  • 郑州的网站建设公司有哪些舆情网站
  • 子域名 做单独的网站不死鸟分享友情链接
  • 网站平台建设多少钱专业网站优化外包