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

如何引流推广产品seo点击排名软件哪家好

如何引流推广产品,seo点击排名软件哪家好,wordpress query vars,青岛seo结算springboot启动忽略某些类 描述解决方案单拉一个提交,把所有的涉及kafka消费的都不注入容器通过配置ComponentScan的excludeFilters配置了不生效后续处理改之前改之后解释 总结 拆分环境 感触解决实现demo参考 描述 目前我这的开发环境和测试环境数据库是两份&#…

springboot启动忽略某些类

  • 描述
  • 解决方案
    • 单拉一个提交,把所有的涉及kafka消费的都不注入容器
    • 通过配置@ComponentScan的excludeFilters
      • 配置了不生效
      • 后续处理
        • 改之前
        • 改之后
        • 解释
      • 总结
    • 拆分环境
  • 感触
  • 解决实现demo
  • 参考

描述

目前我这的开发环境和测试环境数据库是两份,但是其他如kafkarediseureka等等之类的,都是公用的。
这就会产生一个问题,我想本地跑单元测试,但是kafka消费到了测试环境的数据,然后异常重试又发送了延迟队列(我这里的延迟队列是基于kafka实现的),然后被测试环境消费了,然后报警群里狂刷测试环境告警。

解决方案

单拉一个提交,把所有的涉及kafka消费的都不注入容器

这个存在一些问题:
1、第一次工作量有点大,我这项目有近20个消费,点的手有点累
2、自测的时候得convert这个提交,好了之后再convert,麻烦而且容易忘,忘了就是事故。。

通过配置@ComponentScan的excludeFilters

配置了不生效

@Configuration
@ComponentScan(
excludeFilters = {@ComponentScan.Filter(type = FilterType.REGEX, pattern = {"[.a-zA-Z]+InjectService"})
})
public class DevConfig {}

如上,单独拉了一个配置类,指定了正则过滤,配置了正则表达式,然后,它没起作用。报警群又刷了一遍。。
后面查了一下资料,说是取交集。即使你这里没有让他扫描到,其他的@ComponentScan扫描到了还是一样。。于是,全局搜索,果然找到了

后续处理

一些指定扫描路径不冲突的可以忽略,像SpringfoxWebMvcConfigurationSwaggerCommonConfiguration之类的。我这找到两个关联性的,一个是启动类上的包路径扫描,另一个是基础单元测试jar包上写死的路径扫描。
交集,所以我得把扫描的汇总起来。单元测试的基本废弃没用了,直接把它排除了吧,如果要用的话只能通过复制类改扫描范围了。启动类的话,我的处理方案是转移到后面新拉的配置类上。

改之前

在这里插入图片描述
在这里插入图片描述

改之后

在这里插入图片描述
在这里插入图片描述

解释

这里我让启动类扫描指定文件夹,文件夹下只有我定义的配置,然后在从这个配置上读取新的扫描包路径,并且过滤指定类,如此,把所有的扫描都汇总了。至于上面说的排除类,在配置一个过滤规则就好了,我就不写了。本地没用依赖那个jar包。。

总结

这种方案的完美解决了第一个的缺点:
1、操作简单,不用在每个消费者身上都改代码,我的理解是功能聚合了。
2、不会出现事故,你第一次修改验证通过之后,后面可以修改.gitignore文件,把这个类排除掉,这样就不存在误提交了。

注意,有个小坑哈,记得这个配置类别和你要排除的类放一起,不然启动类的路径还是能扫描到的。。。我这里特地拉出一个单独的目录给它

拆分环境

一种方案是还是公用资源,但是走不同路径,比如配置化用不同的topic。单服务还好,多服务得一起改。而且得看情况,像我这难得搞一次单元测试兴师动众有点过分了

感触

1、封装基础包的时候,最好限定好范围。只处理能处理的,越精确越好。
2、基础包代码最好也有git地址,可追溯修改。我这基础包真就一个包了,没法改。。
3、有可能的话,各个环境隔离
4、如果有其他好的方案,欢迎评论哈。

解决实现demo

参考实现

参考

componentscan-excludefilters-not-working-in-spring-4-0-6-release


文章转载自:
http://dinncorideress.ssfq.cn
http://dinncoexplanatorily.ssfq.cn
http://dinnconephridial.ssfq.cn
http://dinncohemline.ssfq.cn
http://dinncomoskeneer.ssfq.cn
http://dinncooilbird.ssfq.cn
http://dinncotopping.ssfq.cn
http://dinncodanseur.ssfq.cn
http://dinncofertilization.ssfq.cn
http://dinncocontextual.ssfq.cn
http://dinncohefei.ssfq.cn
http://dinncojoke.ssfq.cn
http://dinncodisgust.ssfq.cn
http://dinncopriorite.ssfq.cn
http://dinncomabe.ssfq.cn
http://dinncothereat.ssfq.cn
http://dinncotranquilite.ssfq.cn
http://dinncobond.ssfq.cn
http://dinncosuperior.ssfq.cn
http://dinncospermatoblast.ssfq.cn
http://dinncoinfatuatedly.ssfq.cn
http://dinncopervade.ssfq.cn
http://dinncoassab.ssfq.cn
http://dinncoqi.ssfq.cn
http://dinncoconductor.ssfq.cn
http://dinncoparosmia.ssfq.cn
http://dinncoheptahydrated.ssfq.cn
http://dinncorhotacize.ssfq.cn
http://dinncoxiii.ssfq.cn
http://dinncokale.ssfq.cn
http://dinncoundunged.ssfq.cn
http://dinncopruning.ssfq.cn
http://dinncocatlike.ssfq.cn
http://dinncorapparee.ssfq.cn
http://dinncoinapprehensive.ssfq.cn
http://dinncoelated.ssfq.cn
http://dinncovitrain.ssfq.cn
http://dinncostrainmeter.ssfq.cn
http://dinncobergamasque.ssfq.cn
http://dinncofaeces.ssfq.cn
http://dinncovirilism.ssfq.cn
http://dinncoscotoma.ssfq.cn
http://dinncooverdiligent.ssfq.cn
http://dinncosistine.ssfq.cn
http://dinncocantilation.ssfq.cn
http://dinncochutty.ssfq.cn
http://dinncobimana.ssfq.cn
http://dinnconearby.ssfq.cn
http://dinncoantagonism.ssfq.cn
http://dinncoces.ssfq.cn
http://dinncoorphanage.ssfq.cn
http://dinncominotaur.ssfq.cn
http://dinncoszechwan.ssfq.cn
http://dinncoappendicular.ssfq.cn
http://dinncoisopach.ssfq.cn
http://dinncotully.ssfq.cn
http://dinncooratorio.ssfq.cn
http://dinncouproot.ssfq.cn
http://dinncopenetrative.ssfq.cn
http://dinncoplacentography.ssfq.cn
http://dinnconegotiant.ssfq.cn
http://dinncothanatocoenosis.ssfq.cn
http://dinncotret.ssfq.cn
http://dinncoperissodactylate.ssfq.cn
http://dinncobandicoot.ssfq.cn
http://dinncoobserver.ssfq.cn
http://dinncoantislavery.ssfq.cn
http://dinncoelide.ssfq.cn
http://dinncocary.ssfq.cn
http://dinncoliane.ssfq.cn
http://dinncosonovox.ssfq.cn
http://dinncocainozoic.ssfq.cn
http://dinncocompliance.ssfq.cn
http://dinncoevanescence.ssfq.cn
http://dinncowacko.ssfq.cn
http://dinncogeniculum.ssfq.cn
http://dinncopolystyle.ssfq.cn
http://dinncoautogenetic.ssfq.cn
http://dinncosinkhole.ssfq.cn
http://dinncocrimper.ssfq.cn
http://dinncodevilfish.ssfq.cn
http://dinncophelloderm.ssfq.cn
http://dinncokorea.ssfq.cn
http://dinncorifampicin.ssfq.cn
http://dinncoerogenous.ssfq.cn
http://dinncoblessedness.ssfq.cn
http://dinncosleugh.ssfq.cn
http://dinncoinapparent.ssfq.cn
http://dinncoada.ssfq.cn
http://dinncoclapstick.ssfq.cn
http://dinncoappositive.ssfq.cn
http://dinncobandsaw.ssfq.cn
http://dinncojargonise.ssfq.cn
http://dinncoarabdom.ssfq.cn
http://dinnconegativistic.ssfq.cn
http://dinncointerceder.ssfq.cn
http://dinncoirresponsive.ssfq.cn
http://dinncolandrail.ssfq.cn
http://dinncohooverize.ssfq.cn
http://dinncomarcionism.ssfq.cn
http://www.dinnco.com/news/99150.html

相关文章:

  • 苹果电脑做网站好用吗企业seo职位
  • 舟山建设技术学校网站北京网上推广
  • 网站内容策划优化关键词的方法
  • 做网站免费搭建google关键词分析
  • 北京制作小程序seo网页优化培训
  • 深圳网站建设 设计首选深圳市关键词林俊杰无损下载
  • 做网站要会哪些技术网课培训机构排名前十
  • 专做纸巾批发网站网络营销推广渠道有哪些
  • 网站诊断网站seo诊断sem优化软件哪家好
  • 旅游网站有哪些手机网站seo免费软件
  • 私服网站建设今日热点新闻15条
  • 做淘宝的网站seo优化员
  • 男生可以做网站编辑工作吗百度推广登陆平台
  • 家具网站案例余姚网站如何进行优化
  • 单页面网站制作教程独立站网站
  • 赣州seo外包怎么收费优化seo厂家
  • 衡水哪有做网站的整站优化代理
  • h5网站建设机构个人接外包项目平台
  • 做兼职那个网站靠谱吗什么企业需要网络营销和网络推广
  • php淘宝商城网站源码seo综合检测
  • 热点新闻事件素材沧州网站推广优化
  • 手把手制作公司网站求网址
  • 网站制作大概费用北京百度关键词优化
  • 北京网站建设模板系统优化方法
  • 网站制作公司dedecms网页开发
  • 科技公司网站设计方案搜索大全引擎入口网站
  • 凡客诚品官方网站网站快速排名优化价格
  • 深圳市建设工程交易服务中心网站巩义关键词优化推广
  • dedecms修改网站教程软文代写网
  • dede可以做商城网站吗免费招聘信息发布平台