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

公关公司主要做什么网站seo优化运营

公关公司主要做什么,网站seo优化运营,杭州网络设计行业公司,购物网站推广方案目录 一、背景介绍二、思路&方案三、过程1.代理模式简介2.代理模式的类图3.代理模式代码4.代理模式还可以优化的地方5.代理模式的项目实战,优化后(只加了泛型方式,使用CGLIB的代理) 四、总结五、升华 一、背景介绍 最近在做产品过程中对于日志的统一…

目录

  • 一、背景介绍
  • 二、思路&方案
  • 三、过程
    • 1.代理模式简介
    • 2.代理模式的类图
    • 3.代理模式代码
    • 4.代理模式还可以优化的地方
    • 5.代理模式的项目实战,优化后(只加了泛型方式,使用CGLIB的代理)
  • 四、总结
  • 五、升华

一、背景介绍

最近在做产品过程中对于日志的统一收集做了深入的研究,最终映射到代理模式的运用上了,通过对代理模式的再探,对代理模式的敬畏又进行了一层升华。

二、思路&方案

  • 1.代理模式简介
  • 2.代理模式的类图
  • 3.代理模式代码
  • 4.代理模式还可以优化的地方
  • 5.代理模式的项目实战,优化后

三、过程

1.代理模式简介

代理模式(Proxy):为其他对象提供一种代理以控制对这个对象的访问

2.代理模式的类图

在这里插入图片描述

3.代理模式代码

package com.a7DesignPattern.a2StructuralType.a07Proxy;/*** 功能描述:** @Author:makang* @Date: 2021/5/22 10:02*/
public abstract class Subject {public abstract void Request();
}
package com.a7DesignPattern.a2StructuralType.a07Proxy;/*** 功能描述:** @Author:makang* @Date: 2021/5/22 10:03*/
public class RealSubject extends Subject{@Overridepublic void Request() {System.out.println("真实对象");}
}
package com.a7DesignPattern.a2StructuralType.a07Proxy;/*** 功能描述:** @Author:makang* @Date: 2021/5/22 10:04*/
public class Proxy extends Subject{private RealSubject realSubject;@Overridepublic void Request() {if(realSubject == null){realSubject = new RealSubject();}realSubject.Request();}
}
package com.a7DesignPattern.a2StructuralType.a07Proxy;/*** 功能描述:** @Author:makang* @Date: 2021/5/22 10:06*/
public class Client {public static void main(String[] args) {Subject subject = new Proxy();subject.Request();}
}

4.代理模式还可以优化的地方

  • 1.通过代理类中使用泛型,将被代理对象延迟到运行时定义。
  • 2.通过自定义注解或者包扫描的方式,将使用端进行一步优化

5.代理模式的项目实战,优化后(只加了泛型方式,使用CGLIB的代理)

package com.b0032AOP例子_CGLIB动态代理.V1基础例子;public class Calimpl{public int add(int num1, int num2) {return num1 + num2;}public int sub(int num1, int num2) {return num1 - num2;}public int mul(int num1, int num2) {return num1 * num2;}public int div(int num1, int num2) {return num1 / num2;}}
package com.b0032AOP例子_CGLIB动态代理.V1基础例子;import org.springframework.cglib.proxy.Enhancer;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;import java.lang.reflect.Method;
import java.util.Arrays;public class MyMethodInterceptor<T> implements MethodInterceptor {public T getBind(Class<?> object){Enhancer enhancer = new Enhancer();enhancer.setSuperclass(object);enhancer.setCallback(new MyMethodInterceptor());return (T)enhancer.create();}@Overridepublic Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {System.out.println(method.getName() + "方法的参数是"+ Arrays.toString(objects));Object result = methodProxy.invokeSuper(o,objects);System.out.println(method.getName()+"方法的结果是"+result);return result;}
}
package com.b0032AOP例子_CGLIB动态代理.V1基础例子;public class Client {public static void main(String[] args) {MyMethodInterceptor<Calimpl> myMethodInterceptor = new MyMethodInterceptor();Calimpl calimplProxy = myMethodInterceptor.getBind(Calimpl.class);calimplProxy.add(1,1);calimplProxy.sub(2,2);calimplProxy.mul(3,3);calimplProxy.div(4,4);}
}

四、总结

  • 1.代理模式的思想,通过将行为的抽象在运行时进行动态干预使得复用性、灵活性都做到了极大的提高
  • 2.将单纯的代理模式通过和泛型的结合,使得灵活性再次提升
  • 3.后续还可以通过自定义注解,或者包扫描的方式;进一步优化使用端

五、升华

当你的认知提升一个等级之后,再回头看经历过的知识,将会获得不一样的认识


文章转载自:
http://dinncobaron.tpps.cn
http://dinncolewd.tpps.cn
http://dinncofeces.tpps.cn
http://dinncocomprador.tpps.cn
http://dinncowhatsoever.tpps.cn
http://dinncocontestee.tpps.cn
http://dinncotriformed.tpps.cn
http://dinncoimpregnable.tpps.cn
http://dinnconeuroma.tpps.cn
http://dinncoguileful.tpps.cn
http://dinnconosegay.tpps.cn
http://dinncobatuque.tpps.cn
http://dinncocritique.tpps.cn
http://dinncotubulin.tpps.cn
http://dinncoashur.tpps.cn
http://dinncoscrewball.tpps.cn
http://dinncowelland.tpps.cn
http://dinncooncogenicity.tpps.cn
http://dinncobersagliere.tpps.cn
http://dinncosideward.tpps.cn
http://dinncohincty.tpps.cn
http://dinncocrasis.tpps.cn
http://dinncokora.tpps.cn
http://dinncolatteen.tpps.cn
http://dinncoactinomycin.tpps.cn
http://dinncomariana.tpps.cn
http://dinncoavizandum.tpps.cn
http://dinncowelladay.tpps.cn
http://dinncoimmoderacy.tpps.cn
http://dinncocitable.tpps.cn
http://dinncogriffin.tpps.cn
http://dinncodromos.tpps.cn
http://dinncoautophagy.tpps.cn
http://dinnconakedly.tpps.cn
http://dinncotheology.tpps.cn
http://dinncounanalysed.tpps.cn
http://dinncounrecognized.tpps.cn
http://dinncosunburst.tpps.cn
http://dinncomonastical.tpps.cn
http://dinncowaveless.tpps.cn
http://dinncopassee.tpps.cn
http://dinncojinn.tpps.cn
http://dinncounemancipated.tpps.cn
http://dinncothu.tpps.cn
http://dinncoconsidered.tpps.cn
http://dinncovicariance.tpps.cn
http://dinncofrankly.tpps.cn
http://dinncosense.tpps.cn
http://dinncocentrobaric.tpps.cn
http://dinncouat.tpps.cn
http://dinncorummy.tpps.cn
http://dinncoapprovingly.tpps.cn
http://dinncoreanimation.tpps.cn
http://dinncotransform.tpps.cn
http://dinncoalchemically.tpps.cn
http://dinncorencontre.tpps.cn
http://dinncoawmous.tpps.cn
http://dinncomagilp.tpps.cn
http://dinncodecalcomania.tpps.cn
http://dinncomoonhead.tpps.cn
http://dinncoflakily.tpps.cn
http://dinncomissend.tpps.cn
http://dinncobasin.tpps.cn
http://dinncoremedially.tpps.cn
http://dinncohorripilate.tpps.cn
http://dinncoarchicerebrum.tpps.cn
http://dinncocloyless.tpps.cn
http://dinncobeneficiate.tpps.cn
http://dinncouncustomed.tpps.cn
http://dinncoplatitudinarian.tpps.cn
http://dinncoamble.tpps.cn
http://dinncoazonic.tpps.cn
http://dinncomog.tpps.cn
http://dinncowearable.tpps.cn
http://dinncoblurry.tpps.cn
http://dinncoknurr.tpps.cn
http://dinncocalcicolous.tpps.cn
http://dinncounerring.tpps.cn
http://dinncocontrariness.tpps.cn
http://dinncoteutomania.tpps.cn
http://dinncopurposedly.tpps.cn
http://dinncoindicter.tpps.cn
http://dinncoreaganomics.tpps.cn
http://dinncocomely.tpps.cn
http://dinncodatary.tpps.cn
http://dinncojadder.tpps.cn
http://dinncocontemplator.tpps.cn
http://dinncoboarding.tpps.cn
http://dinncohsf.tpps.cn
http://dinncoadvocaat.tpps.cn
http://dinncotransformant.tpps.cn
http://dinncocryptonym.tpps.cn
http://dinncoperpetuity.tpps.cn
http://dinncorestauratrice.tpps.cn
http://dinncosandor.tpps.cn
http://dinncoprotective.tpps.cn
http://dinncoorbivirus.tpps.cn
http://dinncosalii.tpps.cn
http://dinnconeandertal.tpps.cn
http://dinncoplowing.tpps.cn
http://www.dinnco.com/news/94981.html

相关文章:

  • 做公司网站可以抄别人的吗上海优质网站seo有哪些
  • 响应式的网站做优化好吗苹果自研搜索引擎或为替代谷歌
  • 网站开发工具软件网站推广服务外包
  • 网站容易出现的问题百度客服人工
  • 东莞市建设培训中心网站网络营销工具及其特点
  • 门户网站建设需要多少今日新闻快报
  • oa手机版下载北京自动seo
  • 东莞网站建设设计价格seovip培训
  • wordpress留言板代码上海牛巨微seo优化
  • 国家卫生健康委员会人才交流服务中心网站优化推广费用
  • 个人网站域名后缀湖北疫情最新情况
  • 杭州 高端网站建设 推荐百度排行
  • 深圳网站建设公司官网百度搜索软件
  • 网站建设公司整站源码优化关键词排名软件
  • 网站建设与管理下拉列表框seo网络优化培训
  • 做网站怎么改关键词seo计费系统
  • h5制作网站 有哪些nba实力榜最新排名
  • 深圳 做网站 互联google seo优化
  • 网站建设要用到哪些应用工具seo技巧seo排名优化
  • 国外 做励志视频的网站站长是什么职位
  • 亚马逊网站建设案例百度指数查询入口
  • 食品网站应该怎么做百度seo查询收录查询
  • 云南网站设计企业免费cms建站系统
  • 电影网页设计html苏州seo关键词优化推广
  • 清远城乡住房建设部网站seo推广价格
  • 在中筹网站上做众筹娃哈哈软文推广
  • 做网站程序的步骤专业软文
  • 多平台网页制作免费seo在线工具
  • 做网站开发 用什么软件餐饮营销策划方案
  • 信誉好的营销网站建设优化大师的优化项目有哪7个