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

绍兴网站建设方案推广搜索引擎优化的基本原理

绍兴网站建设方案推广,搜索引擎优化的基本原理,网站开发怎么让别人看到,仿百度百科网站源码1 概要 1.1 实现一个最简单的微服务。远程调用负载均衡#xff0c;基本上完成了最核心的微服务框架。 远程调用#xff1a;RestTemplate 注册中心#xff1a;eureka 负载均衡#xff1a;Ribbon 1.2 要点 1.2.1 依赖 1.2.1.1 主框架依赖 spring boot 依赖 depe…1 概要 1.1 实现一个最简单的微服务。远程调用负载均衡基本上完成了最核心的微服务框架。 远程调用RestTemplate 注册中心eureka 负载均衡Ribbon 1.2 要点 1.2.1 依赖 1.2.1.1 主框架依赖 spring boot 依赖 dependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter/artifactId/dependency spring cloud 依赖 dependencyManagementdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-dependencies/artifactIdversion${spring-cloud.version}/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagement 1.2.1.2  eureka依赖 服务端依赖 groupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-server/artifactId 客户端依赖  groupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-client/artifactId 1.2.2 配置文件 服务设置 server:port: 10086 spring:application:name: eureka server 服务注册 eureka:client:service-url:defaultZone: http://127.0.0.1:10086/eureka/ 1.2 技术关键词 spring-cloud-starterspring-cloud-dependencies spring-cloud-starter-netflix-eureka-server spring-cloud-starter-netflix-eureka-client spring-boot-starter-web spring:application:name: eureka server eureka:client:service-url:defaultZone: http://127.0.0.1:10086/eureka/ SpringBootApplication EnableEurekaServer Bean LoadBalanced public RestTemplate Autowired RestTemplate restTemplate; RestController return 函数2restTemplate.getForObject(url,String.class); SpringApplication.run(Main.class); 2 代码 2.1 父工程 ?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/modelVersionparentgroupIdcom.xjc.springcloundtest/groupIdartifactIddemo8/artifactIdversion0.0.1-SNAPSHOT/version/parentartifactIduntitled/artifactIdpropertiesmaven.compiler.source21/maven.compiler.sourcemaven.compiler.target21/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-server/artifactId/dependency/dependencies /project 2.2 注册中 eureka 2.2.1 工程文件 ?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/modelVersionparentgroupIdcom.xjc.springcloundtest/groupIdartifactIddemo8/artifactIdversion0.0.1-SNAPSHOT/version/parentartifactIduntitled/artifactIdpropertiesmaven.compiler.source21/maven.compiler.sourcemaven.compiler.target21/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-server/artifactId/dependency/dependencies /project 2.2.2 配置文件 server:port: 10086 spring:application:name: eureka server eureka:client:service-url:defaultZone: http://127.0.0.1:10086/eureka/ 2.2.3 主函数 package com.xjc.springcloundtest;import com.netflix.discovery.shared.Application; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;SpringBootApplication EnableEurekaServer public class Main {public static void main(String[] args) {SpringApplication.run(Main.class);System.out.println(Hello world!);} } 2.2.4 运行效果 2.3 服务工程 2.2.1 工程文件 ?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/modelVersionparentgroupIdcom.xjc.springcloundtest/groupIdartifactIddemo8/artifactIdversion0.0.1-SNAPSHOT/version/parentartifactIduntitled1/artifactIdpropertiesmaven.compiler.source21/maven.compiler.sourcemaven.compiler.target21/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-client/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency/dependencies/project 2.3.2 配置文件 spring:application:name: server1 eureka:client:service-url:defaultZone: http://127.0.0.1:10086/eureka/ 2.3.3 主函数 package com.xjc.springcloundtest;import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;SpringBootApplication public class Main {public static void main(String[] args) {SpringApplication.run(Main.class);System.out.println(Hello world!);} } 2.3.4 控制器 package com.xjc.springcloundtest;import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController;RestController public class TestController {RequestMapping(/fun)public String fun(){return 函数1;} }2.3.5 运行效果 2.4 消费者 2.4.1 工程文件 ?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/modelVersionparentgroupIdcom.xjc.springcloundtest/groupIdartifactIddemo8/artifactIdversion0.0.1-SNAPSHOT/version/parentartifactIduntitled2/artifactIdpropertiesmaven.compiler.source21/maven.compiler.sourcemaven.compiler.target21/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-netflix-eureka-client/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency/dependencies/project 2.4.2 配置文件 server:port: 8081 spring:application:name: server2 eureka:client:service-url:defaultZone: http://127.0.0.1:10086/eureka/ 2.4.3 主函数 package com.xjc.springcloundtest;import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.context.annotation.Bean; import org.springframework.web.client.RestTemplate;SpringBootApplication public class Main {public static void main(String[] args) {SpringApplication.run(Main.class);System.out.println(Hello world!);}BeanLoadBalancedpublic RestTemplate restTemplate(RestTemplateBuilder builder ){return builder.build();} } 2.4.4 消费者 package com.xjc.springcloundtest;import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate;RestController public class TestController {AutowiredRestTemplate restTemplate;RequestMapping(/fun)public String fun(){//String url http://localhost:8080/fun;String url http://server1/fun;return 函数2restTemplate.getForObject(url,String.class);} }2.4.5 运行效果
http://www.zqtcl.cn/news/987613/

相关文章:

  • html5 手机 网站盘锦建设工程信息网站
  • 高端企业网站定制公司wordpress喜欢_赏_分享
  • 网站开发推广方案策划书开发公司移交给物业资料说明
  • 做响应式网站的菜单中国造价网官网
  • 爱心捐赠网站怎么做中国机械网官网
  • 好的ftp网站微信小程序开发基础
  • 西安 网站 公司wordpress+帖子置顶
  • 广州开发网站服务上海千途网站建设
  • 网站建设功能分为几种百度搜索数据
  • 电影网站模板html微信开发者代码管理
  • 小程序ui界面设计手机优化大师官网
  • 佳木斯市建设局网站网络游戏名
  • 建筑钢结构网站汉阳网站建设哪家便宜
  • 营销型网站建设评价临湘网站建设
  • 做网站的价格参考巴中建网站的公司
  • 张家口建设网站网络技术工程师
  • 大型网站后台登录地址一般是如何设置的哪里网站用vue.js做的
  • 网页设计规范图标设计百度seo优化多少钱
  • 网站打开速度概念建筑网站知乎
  • 网站的flash怎么做的杭州市城乡建设网官网
  • 宿迁网站建设排名wordpress多站点可视化
  • 苏州好的做网站的公司哪家好前端如何做响应式网站
  • 广州网站建设招标推广方式有哪些渠道
  • 郑州做网站狼牙东莞建设造价信息网站
  • 网站制作代理加盟国内seo服务商
  • 如何在建设银行网站预约纪念币网络销售好不好做
  • 利用淘宝视频服务做视频网站聊城做网站价格
  • 做美容行业的网站哪个好广西互联网企业
  • 做网站平台的营业执照江镇做包子网站
  • 网站建设 摄影服务wordpress破解模板