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

12306 网站谁做的seo的作用主要有

12306 网站谁做的,seo的作用主要有,电子商务网站建设答辩记录,房价下跌最惨10大城市一、 Feign简介 Feign [feɪn] 译文 伪装。Feign是一个声明式WebService客户端.使用Feign能让编写WebService客户端更加简单,它的使用方法是定义一个接口#xff0c;然后在上面添加注解。不再需要拼接URL#xff0c;参数等操作。项目主页#xff1a;https://github.com/Ope…一、 Feign简介 Feign [feɪn] 译文 伪装。Feign是一个声明式WebService客户端.使用Feign能让编写WebService客户端更加简单,它的使用方法是定义一个接口然后在上面添加注解。不再需要拼接URL参数等操作。项目主页https://github.com/OpenFeign/feign 。 集成Ribbon的负载均衡功能集成了Hystrix的熔断器功能支持请求压缩大大简化了远程调用的代码同时功能还增强啦Feign以更加优雅的方式编写远程调用代码并简化重复代码 快速入门 实现步骤 导入feign依赖编写Feign客户端接口消费者启动引导类开启Feign功能注解访问接口测试 1. 导入feign依赖 !--配置feign--dependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-openfeign/artifactId/dependency1.1创建实体类User package com.william.domain;import java.util.Date;/*** author lijunxuan* date Created in 2019/6/30 18:20* description * version: 1.0*/ public class User {private Integer id;//主键idprivate String username;//用户名private String password;//密码private String name;//姓名private Integer age;//年龄private Integer sex;//性别 1男性2女性private Date birthday; //出生日期private Date created; //创建时间private Date updated; //更新时间private String note;//备注Overridepublic String toString() {return User{ id id , username username \ , password password \ , name name \ , age age , sex sex , birthday birthday , created created , updated updated , note note \ };}public Integer getId() {return id;}public void setId(Integer id) {this.id id;}public String getUsername() {return username;}public void setUsername(String username) {this.username username;}public String getPassword() {return password;}public void setPassword(String password) {this.password password;}public String getName() {return name;}public void setName(String name) {this.name name;}public Integer getAge() {return age;}public void setAge(Integer age) {this.age age;}public Integer getSex() {return sex;}public void setSex(Integer sex) {this.sex sex;}public Date getBirthday() {return birthday;}public void setBirthday(Date birthday) {this.birthday birthday;}public Date getCreated() {return created;}public void setCreated(Date created) {this.created created;}public Date getUpdated() {return updated;}public void setUpdated(Date updated) {this.updated updated;}public String getNote() {return note;}public void setNote(String note) {this.note note;} } 2. 编写Feign客户端接口 package com.william.service;import com.william.domain.User; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam;FeignClient(user-service) public interface UserClient {/***RequestMapping* spring mvc 里面的注解* RequestMapping 反向映射生成请求地址。http请求* RequestParam(id) 是必须要进行请求地址参数的绑定* param id* return*/RequestMapping(/user/findById)User findById(RequestParam(id) Integer id); } 3. 消费者启动引导类DemoApplication开启Feign功能注解 EnableFeignClients//开启feign客户端支持3.1编写ConsumerFeignController使用UserClient访问 package com.william.controller;import com.william.domain.User; import com.william.service.UserClient; import org.springframework.stereotype.Repository; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;/*** author lijunxuan* date Created in 2019/6/30 18:33* description * version: 1.0*/ RestController public class FeigConsumerController {ResourceUserClient userClient;//注入FeignCLientRequestMapping(/findByIdFeign)public User findByIdFeign(Integer id){return userClient.findById(id);} } 4. 访问接口测试
http://www.pierceye.com/news/502780/

相关文章:

  • 集团网站源码域名备案成功如何做网站
  • 吉林省建设监理协会网站诚信建设智慧团建官网登录
  • 萧县住房和城乡建设局网站文学网站模板下载
  • 家用电脑可以做网站吗wordpress获取文章信息
  • 山东公路建设集团网站wordpress插件代码
  • 惠州网站公司网站制作成app
  • 站群管理系统汕头网站建设和运营
  • 泉州哪里做网站开发攻击asp网站
  • 网站参考模板网络营销案例论文3000字
  • 网站开发 盈利采购网站模板
  • 营销网站建设的规则徐州经济开发区网站
  • 做动图的网站知乎wordpress 死链提交
  • 无锡网站维护公司安卓手机优化软件排名
  • 怎么查一个网站做的外链浏览器网站免费进入
  • 济南网站建设小程序必要网站用什么做的
  • 京东商城网站怎么做wordpress幻灯
  • 建设银行明细网站能查多久企业取名
  • 总行网站建设银行报培训机构是干什么的
  • 企业网站推广建议淳安千岛湖建设集团网站
  • 网站建设代码优化石家庄门户网站制作
  • 网站可以制作ios网站源码提取
  • 建设银行网站怎么开通手机通知做网站回答
  • 网页制作的价格大概三河网站seo
  • 东莞网站建设 信科网络wordpress图片域名
  • 软件行业 网站建设 模块吉林电商的网络推广
  • 自己有服务器和域名怎么做网站门户网站建设推荐
  • 兰州新站点seo代理吉林市网站建设招标
  • 网站开发形式选择wordpress tag__not_in
  • 中国建设银行官网登录入口手机版长沙seo外包平台
  • 网站开发过程分为哪几个阶段电子商务网站建设毕业设计