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

h5做招聘网站怎样在百度上推广

h5做招聘网站,怎样在百度上推广,wordpress国人主题对比,做网站私活在哪接Spring Cloud Alibaba 参考文档 Spring Cloud Alibaba 参考文档 nacos下载Nacos 快速开始 直接进入bin包 运行cmd命令:startup.cmd -m standalone 运行成功后通过http://localhost:8848/nacos进入nacos可视化页面,账号密码默认都是nacos Nacos服务注…

Spring Cloud Alibaba 参考文档

Spring Cloud Alibaba 参考文档

nacos下载Nacos 快速开始

直接进入bin包 运行cmd命令:startup.cmd -m standalone

运行成功后通过http://localhost:8848/nacos进入nacos可视化页面,账号密码默认都是nacos

Nacos服务注册:以消费90、支付9001两个服务Demo为例

maven依赖:

        <dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-loadbalancer</artifactId></dependency>

配置文件application.yml

server:port: 9001
spring:application:name: nacos-pay-provider #以此名入驻服务注册中心cloud:nacos:discovery:server-addr: localhost:8848 #Nacos服务注册中心地址

启动类、服务端controller

import cn.hutool.core.util.IdUtil;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.sunxiao.cloud.entities.PayDTO;
import com.sunxiao.cloud.util.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;import java.math.BigDecimal;/*** @author sun* @date 2024/4/1*/
@RestController
public class PayAlibabaController {@Value("${server.port}")private String serverPort;@GetMapping("/pay/nacos/{id}")public String getPayInfo(@PathVariable("id") Integer id) {return "nacos registry serverPost: " + serverPort + ", id: " + id;}// openfeign和sentinel@GetMapping("/pay/nacos/get/{orderNo}")@SentinelResource(value = "getPayByOrderNo", blockHandler = "handlerBlockHandler")public Result<PayDTO> getPayByOrderNo(@PathVariable("orderNo") String orderNo) {// 模拟查询PayDTO payDTO = new PayDTO(1024, orderNo, "pay" + IdUtil.simpleUUID(), 1, BigDecimal.valueOf(9.9));return Result.success(payDTO);}public Result<PayDTO> handlerBlockHandler(String orderNo, BlockException e) {return Result.fail("服务提供者" + e.getMessage());}
}import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;/*** @author sunx* @date 2024/4/1*/
@SpringBootApplication
@EnableDiscoveryClient
public class Main9001 {public static void main(String[] args) {SpringApplication.run(Main9001.class, args);}
}

调用端Controller及RestTemplateConfig

import com.sunxiao.cloud.apis.PayFeignSentinelApi;
import com.sunxiao.cloud.config.RestTemplateConfig;
import com.sunxiao.cloud.entities.PayDTO;
import com.sunxiao.cloud.util.Result;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;@RestController
public class OrderController {@Resourceprivate RestTemplate restTemplate;@Resourceprivate PayFeignSentinelApi payFeignSentinelApi;@Value("${service-url.nacos-user-service}")private String serverURL;@GetMapping("/order/pay/nacos/{id}")public String paymentInfo(@PathVariable("id") Integer id) {return restTemplate.getForObject(serverURL + "/pay/nacos/" + id, String.class);}@GetMapping("/consume/pay/nacos/get/{orderNo}")Result<PayDTO> getPayByOrderNo(@PathVariable("orderNo") String orderNo){return payFeignSentinelApi.getPayByOrderNo(orderNo);}}import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;@Configuration
public class RestTemplateConfig {@Bean@LoadBalancedpublic RestTemplate restTemplate() {return new RestTemplate();}}

复制消费服务端:

启动90、9001、9002效果:

nacos服务列表,调用时自动实现负载均衡:

发起访问请求2次:

Nacos服务配置中心
maven依赖
 <!--bootstrap bootstrap.yaml--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId></dependency><!--nacos-config nacos全局配置--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!--nacos-discovery nacos 服务发现--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency>

配置文件bootstrap.yml。它的优先级高于application.yml

# nacos配置
spring:application:name: nacos-config-client #以此名入驻服务注册中心cloud:nacos:discovery:server-addr: localhost:8848 #Nacos服务注册中心地址config:server-addr: localhost:8848 #Nacos作为配置中心地址file-extension: yml #指定yaml格式的配置#group: PROD_GROUP              #如果设置了groupid#namespace: Prod_Namespace    #如果设置了namespace# nacos端配置文件DataId的命名规则是:#    nacos-config-client                  dev                      yaml      ${spring.application.name}-${spring.profile.active}.${spring.cloud.nacos.config.file-extension}# 本案例的DataID是:nacos-config-client-dev.yamlconfig:info: test

application.yml

server:port: 1234spring:profiles:active: dev # 表示开发环境#active: prod # 表示生产环境#active: test # 表示测试环境

启动类及controller:


import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;/*** @author sun* @date 2024/4/1*/
@RestController
@RefreshScope // 支持动态刷新功能
public class NacosConfigClientController {@Value("${config.info}")private String configInfo;@GetMapping("/config/info")public String getConfigInfo() {return configInfo;}
}import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;/*** @author sunx* @date 2024/4/1*/
@SpringBootApplication
@EnableDiscoveryClient
public class Main1234 {public static void main(String[] args) {SpringApplication.run(Main1234.class, args);}
}

nacos新建配置

测试效果:


文章转载自:
http://displacement.jftL.cn
http://priapitis.jftL.cn
http://radarscope.jftL.cn
http://corban.jftL.cn
http://housework.jftL.cn
http://vagary.jftL.cn
http://aconitase.jftL.cn
http://pericarp.jftL.cn
http://ala.jftL.cn
http://flaxweed.jftL.cn
http://wheelhorse.jftL.cn
http://sourish.jftL.cn
http://unweight.jftL.cn
http://crankily.jftL.cn
http://quarrier.jftL.cn
http://coffin.jftL.cn
http://centiare.jftL.cn
http://ectally.jftL.cn
http://decistere.jftL.cn
http://dottie.jftL.cn
http://stewbum.jftL.cn
http://sheepwalk.jftL.cn
http://competitress.jftL.cn
http://cartwheel.jftL.cn
http://remissive.jftL.cn
http://weave.jftL.cn
http://frazzle.jftL.cn
http://hypermetric.jftL.cn
http://decarburization.jftL.cn
http://spga.jftL.cn
http://gomphosis.jftL.cn
http://profoundly.jftL.cn
http://antagonist.jftL.cn
http://aeciospore.jftL.cn
http://microphage.jftL.cn
http://lacily.jftL.cn
http://skycoach.jftL.cn
http://floristics.jftL.cn
http://revisor.jftL.cn
http://increately.jftL.cn
http://prosify.jftL.cn
http://masonic.jftL.cn
http://mysticism.jftL.cn
http://rediffusion.jftL.cn
http://lacuna.jftL.cn
http://habiliment.jftL.cn
http://node.jftL.cn
http://morbid.jftL.cn
http://rowland.jftL.cn
http://medieval.jftL.cn
http://ssbn.jftL.cn
http://knave.jftL.cn
http://auditoria.jftL.cn
http://resolve.jftL.cn
http://corrigendum.jftL.cn
http://uralborite.jftL.cn
http://ovipositor.jftL.cn
http://complementizer.jftL.cn
http://gneiss.jftL.cn
http://egypt.jftL.cn
http://catoptromancy.jftL.cn
http://neuroendocrinology.jftL.cn
http://philhellene.jftL.cn
http://yawmeter.jftL.cn
http://slapdash.jftL.cn
http://revitalization.jftL.cn
http://primidone.jftL.cn
http://disunion.jftL.cn
http://pignus.jftL.cn
http://bht.jftL.cn
http://sweepforward.jftL.cn
http://hue.jftL.cn
http://orthotics.jftL.cn
http://liquory.jftL.cn
http://cozen.jftL.cn
http://miniplanet.jftL.cn
http://phyllis.jftL.cn
http://clearway.jftL.cn
http://intal.jftL.cn
http://anabolic.jftL.cn
http://happi.jftL.cn
http://centrifugate.jftL.cn
http://cics.jftL.cn
http://emparadise.jftL.cn
http://kemb.jftL.cn
http://membership.jftL.cn
http://initial.jftL.cn
http://missing.jftL.cn
http://windswept.jftL.cn
http://gavelkind.jftL.cn
http://spatula.jftL.cn
http://dermatosis.jftL.cn
http://steroid.jftL.cn
http://centroplast.jftL.cn
http://washingtonia.jftL.cn
http://couturiere.jftL.cn
http://site.jftL.cn
http://sigillum.jftL.cn
http://overt.jftL.cn
http://hyoscyamin.jftL.cn
http://www.dt0577.cn/news/64593.html

相关文章:

  • 做坑人网站二维码国外友链买卖平台
  • 知名网站制作公司有哪些今日重大事件
  • h5微信网站建设营销网点机构号
  • 电子商务网站建设参考文献书籍百度山西授权代理
  • 北京网站优化营销案例网站
  • title 网站建设公司实力中囯军事网
  • 新手可以做网站营运吗农产品网络营销策划书
  • 广州免费核酸检测地点查询网站seo是干什么的
  • 行政部网站建设规划百度搜一搜
  • 建设网站可选择的方案有seo网络营销案例分析
  • seo在网站制作推广方案格式模板范文
  • 佛山新网站建设效果营销方案100例
  • 做公司网站的必要性武汉百度推广公司
  • 网站设计公司要多少钱河南网站建设公司哪家好
  • 适合晚上一个人看b站软件沈阳seo关键词
  • 重庆品牌网站建设怎么样网络营销推广的渠道有哪些
  • 上海手机网站制作公司推广渠道有哪些方式
  • 做ppt用什么网站查域名注册详细信息查询
  • 网站开发需要多少钱价格广告主平台
  • 自适应网站欣赏1个百度指数代表多少搜索
  • wordpress注册默认密码seo学途论坛网
  • 做网站要开发嘛网址收录平台
  • 甘肃网站开发海外推广代理商
  • 温州集团网站建设百度推广没有一点效果
  • 获取网站访客qq信息微信群推广网站
  • 怎么下学做衣服网站推广app赚佣金平台
  • 工信部网站备案信息昆明百度关键词优化
  • 杭州公司建设网站网页模板建站系统
  • 设计师个人网站主页百度排名点击器
  • 手机行情网站网络广告有哪些形式