Git Product home page Git Product logo

Comments (4)

binarywang avatar binarywang commented on August 16, 2024

WxMpConfigStorage 仅是一个接口,赋值需要由其实现类完成set方法,具体可以参考me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage 这个实现类

from wxjava.

songjiesdnu avatar songjiesdnu commented on August 16, 2024

我的意思是将set方法也卸载接口中,这样在编程的时候引用类型就可以是WxMpConfigStorage ,而不是具体的实现类

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

基本明白你的意思,你的需求有点特别,不太建议你这么做,一般来说这种配置性质的信息在系统始化设置后就无需修改,除非你有即时修改配置使其生效的需求,这种情况下一般也是在你知道其实例化的类型的前提下完成的,你就可以进行强转实现。

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

而且如果在接口中实现这些set方法,会造成其接口实现类也必要实现该set方法,而事实上实现类可能不需要这些set方法,完全可以通过spring注入实现相应属性的设值。所以如果你确实觉得需要接口来提供这些方法,你可以尝试继承该接口,实现你自己的定制接口即可

from wxjava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.