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

如何建网站服务器seo描述是什么意思

如何建网站服务器,seo描述是什么意思,现代化专业群建设专题网站护理专业,备案时的网站名称Nacos当前命名空间下的配置文件需要跨命名空间读取其他配置文件的内容。可以先通过Nacos提供的API接口获取配置文件内容&#xff0c;然后解析数据将其放入环境的PropertySource中。 相关依赖包 <!-- Nacos依赖包 --> <dependency><groupId>com.alibaba.clo…
Nacos当前命名空间下的配置文件需要跨命名空间读取其他配置文件的内容。可以先通过Nacos提供的API接口获取配置文件内容,然后解析数据将其放入环境的PropertySource中。
  • 相关依赖包
<!-- Nacos依赖包 -->
<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId><version>2.2.6.RELEASE</version><exclusions><exclusion><groupId>com.alibaba.nacos</groupId><artifactId>nacos-client</artifactId></exclusion></exclusions>
</dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId><version>2.2.6.RELEASE</version><exclusions><exclusion><groupId>com.alibaba.nacos</groupId><artifactId>nacos-client</artifactId></exclusion></exclusions>
</dependency><dependency><groupId>com.alibaba.nacos</groupId><artifactId>nacos-client</artifactId><version>2.3.0</version>
</dependency>
  • 部分代码

@Order(Ordered.HIGHEST_PRECEDENCE)
public class NacosEnvironmentPostProcessor implements EnvironmentPostProcessor {private static final String NACOS_PROPERTY_SOURCE_NAME = "NACOS";private static final String[] dataIds = new String[]{"db-sample.yml"};private static final String LOGIN_URL = "http://$host/nacos/v1/auth/users/login";private static final String CONFIGS_URL = "http://$host/nacos/v1/cs/configs?dataId=&group=&appName=&config_tags=&pageNo=1&pageSize=100&tenant=$tenant&search=blur&accessToken=$accessToken";@Overridepublic void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {if (environment instanceof StandardServletEnvironment || environment instanceof StandardReactiveWebEnvironment) {return;}addPropertySource(environment);}private void addPropertySource(ConfigurableEnvironment environment) {Map<String, Object> systemEnvironment = environment.getSystemEnvironment();Object namespaceIdObj = systemEnvironment.get("NACOS_NAMESPACE");if (null == namespaceIdObj) {return;}String host = String.valueOf(systemEnvironment.get("NACOS_HOST"));String username = String.valueOf(systemEnvironment.get("NACOS_USERNAME"));String password = String.valueOf(systemEnvironment.get("NACOS_PASSWORD"));String group = String.valueOf(systemEnvironment.get("NACOS_GROUP"));String namespaceId = String.valueOf(namespaceIdObj);log.info("{} {} {} {} {}", host, username, password, group, namespaceId);processV2(environment, host, username, password, namespaceId);}private void processV1(ConfigurableEnvironment environment, String host, String username, String password,String namespaceId, String group) {NacosConfigProperties nacosConfigProperties = new NacosConfigProperties();nacosConfigProperties.setEnvironment(new StandardEnvironment());nacosConfigProperties.setServerAddr(host);nacosConfigProperties.setUsername(username);nacosConfigProperties.setPassword(password);nacosConfigProperties.setNamespace(namespaceId);nacosConfigProperties.setGroup(group);ConfigService configService = null;try {configService = NacosFactory.createConfigService(nacosConfigProperties.assembleConfigServiceProperties());} catch (NacosException e) {log.error(e.getMessage(), e);}if (null == configService) {return;}Properties properties = new Properties();for (String dataId : dataIds) {addProperties(dataId, getPropertySources(configService, dataId, group), properties);}environment.getPropertySources().addFirst(new PropertiesPropertySource(NACOS_PROPERTY_SOURCE_NAME, properties));}private List<PropertySource<?>> getPropertySources(ConfigService configService, String dataId, String group) {List<PropertySource<?>> propertySources = null;try {String config = configService.getConfig(dataId, group, 10000);log.info("{} {} config {}", dataId, group, config);propertySources = NacosDataParserHandler.getInstance().parseNacosData(dataId, config, null);} catch (Exception e) {log.error(e.getMessage(), e);}return propertySources;}private void processV2(ConfigurableEnvironment environment, String host, String username, String password,String namespaceId) {if (null != host && host.contains(",")) {host = host.split(",")[0];}Map<String, String> params = new HashMap<>();params.put("username", username);params.put("password", password);String loginResp = HttpClientUtils.sendPost(LOGIN_URL.replace("$host", host), params, "UTF-8");log.info("login response {}", loginResp);LoginDTO loginDTO = JsonUtils.json(loginResp, LoginDTO.class);if (null == loginDTO) {return;}String configsResp = HttpClientUtils.sendGet(CONFIGS_URL.replace("$host", host).replace("$tenant", namespaceId).replace("$accessToken", loginDTO.getAccessToken()), "UTF-8");ConfigDTO configDTO = JsonUtils.json(configsResp, ConfigDTO.class);if (null == configDTO) {return;}List<ConfigDTO.Item> pageItems = configDTO.getPageItems();if (null == pageItems) {return;}Properties properties = new Properties();pageItems.forEach(item -> addProperties(item.getDataId(), getPropertySources(item), properties));environment.getPropertySources().addFirst(new PropertiesPropertySource(NACOS_PROPERTY_SOURCE_NAME, properties));}private List<PropertySource<?>> getPropertySources(ConfigDTO.Item item) {List<PropertySource<?>> propertySources = null;try {propertySources = NacosDataParserHandler.getInstance().parseNacosData(item.getDataId(), item.getContent(), null);} catch (Exception e) {log.error(e.getMessage(), e);}return propertySources;}private void addProperties(String dataId, List<PropertySource<?>> propertySources, Properties properties) {if (null == propertySources || propertySources.isEmpty()) {return;}propertySources.forEach(propertySource -> {Object source = propertySource.getSource();if (source instanceof Map) {Map<String, Object> map = (Map) source;map.forEach((key, value) -> {if (!key.equals("spring.application.name") && !key.startsWith("server")) {int i = dataId.lastIndexOf(".");if (i != -1) {properties.setProperty(dataId.substring(0, i + 1) + key, String.valueOf(value));}}});}});}}

文章转载自:
http://corymbose.fwrr.cn
http://circumnavigation.fwrr.cn
http://gripsack.fwrr.cn
http://sitomania.fwrr.cn
http://elope.fwrr.cn
http://vagueness.fwrr.cn
http://anticapitalist.fwrr.cn
http://piloti.fwrr.cn
http://lightsome.fwrr.cn
http://isinglass.fwrr.cn
http://coulomb.fwrr.cn
http://scapulary.fwrr.cn
http://ppcc.fwrr.cn
http://shutterbug.fwrr.cn
http://ordines.fwrr.cn
http://pareve.fwrr.cn
http://squish.fwrr.cn
http://pediculosis.fwrr.cn
http://putrefaction.fwrr.cn
http://oceanologic.fwrr.cn
http://perquisition.fwrr.cn
http://buffoonery.fwrr.cn
http://tho.fwrr.cn
http://teasel.fwrr.cn
http://theorematic.fwrr.cn
http://filial.fwrr.cn
http://conjecturable.fwrr.cn
http://nomogram.fwrr.cn
http://deference.fwrr.cn
http://foraminifer.fwrr.cn
http://solfege.fwrr.cn
http://saveloy.fwrr.cn
http://rakehell.fwrr.cn
http://jumbly.fwrr.cn
http://concave.fwrr.cn
http://snowball.fwrr.cn
http://jacobite.fwrr.cn
http://receptivity.fwrr.cn
http://puddinghead.fwrr.cn
http://autodial.fwrr.cn
http://tench.fwrr.cn
http://spado.fwrr.cn
http://hma.fwrr.cn
http://shrunken.fwrr.cn
http://reascend.fwrr.cn
http://repatriation.fwrr.cn
http://carminite.fwrr.cn
http://manganate.fwrr.cn
http://streetlamp.fwrr.cn
http://bradypepsia.fwrr.cn
http://snoopery.fwrr.cn
http://semicoma.fwrr.cn
http://moldproof.fwrr.cn
http://lethargize.fwrr.cn
http://clough.fwrr.cn
http://phobic.fwrr.cn
http://carouser.fwrr.cn
http://rehearse.fwrr.cn
http://dropsical.fwrr.cn
http://careenage.fwrr.cn
http://chromhidrosis.fwrr.cn
http://wive.fwrr.cn
http://veracity.fwrr.cn
http://townhouse.fwrr.cn
http://morelia.fwrr.cn
http://rascal.fwrr.cn
http://spontoon.fwrr.cn
http://montage.fwrr.cn
http://antimechanized.fwrr.cn
http://pickeer.fwrr.cn
http://chorea.fwrr.cn
http://sancta.fwrr.cn
http://onstage.fwrr.cn
http://gormandize.fwrr.cn
http://distempered.fwrr.cn
http://eris.fwrr.cn
http://inappetency.fwrr.cn
http://salaried.fwrr.cn
http://comtian.fwrr.cn
http://demilitarise.fwrr.cn
http://hadal.fwrr.cn
http://leant.fwrr.cn
http://etiquette.fwrr.cn
http://indetermination.fwrr.cn
http://grappa.fwrr.cn
http://unsophistication.fwrr.cn
http://tautochronism.fwrr.cn
http://township.fwrr.cn
http://rp.fwrr.cn
http://emmenology.fwrr.cn
http://unholiness.fwrr.cn
http://decimalization.fwrr.cn
http://tactually.fwrr.cn
http://presuppurative.fwrr.cn
http://gleed.fwrr.cn
http://marcionism.fwrr.cn
http://homager.fwrr.cn
http://reducing.fwrr.cn
http://dedans.fwrr.cn
http://hemogram.fwrr.cn
http://www.dt0577.cn/news/80340.html

相关文章:

  • 在网站上做漂浮网址查询服务器地址
  • 建立主题网站的知识点企业网站网页设计
  • 官方网站怎么做免费域名申请网站大全
  • 佛山中小企业网站建设搜索关键词然后排名怎样提升
  • 会宁网站建设沈阳seo关键词排名优化软件
  • 网站建设活动计划东莞网站制作
  • 可以用自己电脑做网站服务器吗知乎推广
  • 中铁建设集团门户网站登录宣传网站有哪些
  • 做网站一般都需要什么功能自媒体平台
  • 如何做网站页面赚钱百度云网盘资源链接
  • 信阳市人民政府领导信息公开seo优化收费
  • 网站域名做固定资产怎么处理100个成功营销策划案例
  • 公司网站需要程序员做吗杭州网络整合营销公司
  • 大城县网站建设网站优化资源
  • 沈阳网站建设选网龙百度宣传做网站多少钱
  • 小网站关键词搜什么市场推广方案范文
  • 网页设计项目案例网站市场调研的方法有哪些
  • 网站和域名汕头搜索引擎优化服务
  • 国外网站服务器租用站长seo综合查询
  • 美食的网站建设个人总结天天网站
  • wap网站制作开发公司seo快速排名多少钱
  • 集团公司做网站的好处有什么店铺如何运营和推广
  • 鹤壁做网站的网络公司黄冈网站建设收费
  • canvas效果网站新东方教育培训机构
  • 网站做公司seo关键词分析表
  • 深圳施工勘察建设局网站怎么注册一个自己的网站
  • 做网站用的字体是什么灰色行业seo
  • 赚钱做任务的网站重庆网站优化软件
  • 做网站彩票的代理好吗宁波正规优化seo公司
  • 嘉祥做网站长沙seo外包优化