首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏码农小胖哥的码农生涯

    Spring Boot 2.0 的配置绑定类Bindable居然如此强大

    下面是其条件注入判断的核心类: public class ClientsConfiguredCondition extends SpringBootCondition { private static final Bindable <Map<String, OAuth2ClientProperties.Registration>> STRING_REGISTRATION_MAP = Bindable .mapOf Binder.get(environment).bind("spring.security.oauth2.client.registration", STRING_REGISTRATION_MAP) 首先通过BindableBindable为 Spring Boot 2.0 提供的数据绑定新特性,这里只是它的运用的场景之一。有兴趣可从 spring.io 获取更多信息。 接下来不用我说了吧,照葫芦画瓢还有谁不会呢?

    89130发布于 2021-02-01
  • 来自专栏更流畅、简洁的软件开发方式

    【开源】QuickPager ASP.NET2.0分页控件V2.0.0.1——分页控件的源码(一) 主体

    符合条件的记录数#region 符合条件的记录数         /**//// 

            /// 符合条件的记录数         ///          [Bindable #region 想要查看哪一页的数据         /**////          /// 想要查看那一页的数据         ///          [Bindable         表的主键#region 表的主键         /**////          /// 表的主键         ///          [Bindable         排序字段#region 排序字段         /**////          /// 排序字段         ///          [Bindable         查询条件#region 查询条件         /**////          /// 查询条件         ///          [Bindable

    1.2K70发布于 2018-02-26
  • 来自专栏码匠的流水账

    聊聊springboot的ConfigurationProperties的绑定

    = Bindable.of(bindType).withAnnotations(annotations); if (instance ! private final Object instance; private final ConfigurationProperties annotation; private final Bindable > bind(ConfigurationPropertiesBean propertiesBean) { Bindable<? /context/properties/bind/Binder.java private <T> Object bindObject(ConfigurationPropertyName name, Bindable > getAggregateBinder(Bindable<?> target, Context context) { Class<?

    41821编辑于 2023-09-12
  • 来自专栏韩曙亮的移动开发专栏

    【Jetpack】DataBinding 架构组件 ⑤ ( 数据模型与视图双向绑定 | BaseObservable 实现双向绑定 | ObservableField 实现双向绑定 )

    : Student constructor() { this.student = Student("Tom", 18) } 实现一个 getXxx 函数 , 使用 @Bindable 注解修饰该函数 , 同时 在 DataBinding 布局中 , 为 EditText 组件设置值时 , 也使用该函数设置值 ; 设置了 @Bindable 注解 , 只要 student 对象中的 return student.name } 如果要实现 通过 EditText 修改 数据模型 的效果 , 需要再实现一个 setXxx 函数 , 该函数需要与之前的 使用 @Bindable ", "setStudentName : ${name}") // BR 是编译时自动生成的字段 // studentName 对应的是 上面 被 @Bindable ", "setStudentName : ${name}") // BR 是编译时自动生成的字段 // studentName 对应的是 上面 被 @Bindable

    2K30编辑于 2023-04-24
  • 来自专栏张善友的专栏

    发布一个日期选择控件(ASPNET2.0)

    _dateTextBox.Text = value;    }   }   [Bindable(true), Category("Appearance"), DefaultValue(CalendarTheme.system )ViewState["Language"] : CalendarLanguage.en); }    set { ViewState["Language"] = value; }     }   [Bindable (string)ViewState["SupportDir"] : ""); }    set { ViewState["SupportDir"] = value; }     }   [Bindable ["DisplayTime"] : false); }    set { ViewState["DisplayTime"] = value; }     }   [Browsable(false), Bindable (string)ViewState["TimeFormat"] : ""); }    set { ViewState["TimeFormat"] = value; }     }   [Bindable

    2.4K90发布于 2018-01-19
  • 来自专栏千里行走

    微服务框架saf-8:saf-dubbo之method-config的apollo支持

    SafDubboRPCInstanceNamesConfig) bean; String nsPrefix = SafDubboConstant.PREFIX_DUBBO + ".rpc"; Bindable > target = Bindable.of(SafDubboRPCInstanceNamesConfig.class) .withExistingValue(safDubboRPCConfigBean String methodNamesNSPrefix = SafDubboConstant.PREFIX_DUBBO + "." + rpcInstance + ".method-config"; Bindable " + methodName; Bindable<? > mcTarget = Bindable.of(MethodConfig.class).withExistingValue(mc); binder.bind(mcNSPrefix, mcTarget

    61810发布于 2020-03-04
  • 来自专栏

    Flex 打印DataGrid内容 2.0

    .*;                          [Bindable]             private var pageNumber:Number = 1;                           [Bindable]             private var prodTotal:Number = 0;                          [Bindable]              private var reportTitle:String = "报表标题";                          [Bindable]             private var 

    79330发布于 2018-09-12
  • 来自专栏码匠的流水账

    聊聊springboot的ConfigurationProperties的绑定

    ResolvableType.forMethodReturnType(factory): ResolvableType.forClass(type);Bindable<Object> bindTarget = Bindable.of(bindType).withAnnotations(annotations);if (instance ! > bind(ConfigurationPropertiesBean propertiesBean) {Bindable<? > getAggregateBinder(Bindable<?> target, Context context) {Class<? ArrayBinder(context);}return null;}private <T> Object bindAggregate(ConfigurationPropertyName name, Bindable

    47130编辑于 2023-09-07
  • 来自专栏一个执拗的后端搬砖工

    @ConfigurationProperties工作原理

    ResolvableType.forMethodReturnType(factory) : ResolvableType.forClass(type); Bindable<Object> bindTarget = Bindable.of(bindType).withAnnotations(annotations); if (instance ! > bind(ConfigurationPropertiesBean propertiesBean) { Bindable<? ,然后获取BindHandler,最后获取Binder进行属性绑定,属性绑定会调用Binder类的bind方法: public <T> BindResult<T> bind(String name, Bindable 按照我们前边实例定义的属性格式会走到如下方法: private Object bindDataObject(ConfigurationPropertyName name, Bindable<?

    97030编辑于 2023-09-07
  • 来自专栏Swift社区

    Swift 掌握 Observation 框架

    Text(product) } .onAppear { store.send(.fetch) } }}使用 @Bindable SwiftUI 为此引入了 @Bindable 属性包装器,只能与可观察类型一起使用。 isAuthorized = false func authorize() { isAuthorized.toggle() }}struct AuthView: View { @Bindable } else { Text("Hello, \(viewModel.username)") } } }}你可以使用 @Bindable 有时,你可能需要内联 @Bindable 到视图正文中以创建绑定。

    78121编辑于 2023-12-21
  • 来自专栏代码GG之家

    android MVVM开发模式(二)

    2使用@Bindable注释 @Bindable注释的目的是使得编译机制知道,这个类里面有个数据是需要通知的,因此它会生成通知和被通知的关系链。 我们给User的String name加上这个注释@Bindable,就是告诉编译器你给我把这两个关联起来。 这样子我们有变化则可以给通知了) 3通知数据改变 在我们的User里面,写上 关键技术点:notifyPropertyChanged(BR.name); 通知属性改变了,这里BR类是编译生成的,主要就是@Bindable

    75970发布于 2018-02-01
  • 来自专栏服务化进程

    flex数据绑定

    1 、方法绑定 [Bindable(event="myFlagChanged")] private function isEnabled():String { if (myFlag)return true'; else return ‘false'; } <mx:TextArea id="myTA" text="{isEnabled()}"/> 2 、对象绑定 [ Bindable

    1.1K40发布于 2019-08-02
  • 来自专栏10km的专栏

    jface databinding/PojoBindable实现对POJO对象的支持

    要修改JVM的运行参数 Pojo Bindable是一个Java Agent,所以为了使用PojoBindable,必须在java程序启动时指定jvm参数,用-javaagent参数指定使用PojoBindable -javaagent:<your path>/org.eclipse.core.databinding.pojo.bindable_1.0.0.jar 需要-Dbindable.packages指定对哪些 pojo对象进行修改java代码 -Dbindable.packages=org.eclipse.core.examples.databinding.pojo.bindable.model 需要 ASM 支持 必须将 ObjectWeb ASM加入classpath 关于Pojo Bindable配置的更详细说明参见其官网原文: https://wiki.eclipse.org/JFace_Data_Binding /PojoBindable#With_Pojo_Bindable 参考资料 《JFace Data Binding/PojoBindable》 《AJFace Data Binding - Tutorial

    77210发布于 2019-05-25
  • 来自专栏kafka专栏

    【SpringBoot】配置文件的加载与属性值的绑定

    bindToSpringApplication(ConfigurableEnvironment environment) { try { Binder.get(environment).bind("spring.main", Bindable.ofInstance binder.test.binderInnerTest.innerage=28 绑定 BindResult<BinderTest> result = Binder.get(environment).bind("binder.test", Bindable.of 答案是肯定的,贴一个关键代码 ConfigurationPropertiesBinder public void bind(Bindable<? 必须连续 绑定 BindResult<List<String>> resultlist = Binder.get(environment).bind("binder.test2.list", Bindable.listOf c=c 绑定 BindResult<Map<String, String>> resultmap = Binder.get(environment).bind("binder.test3", Bindable.mapOf

    2.1K30发布于 2021-07-14
  • 来自专栏yang0range

    Android Jetpack系列——DataBinding 最佳实践

    @Bindable 用于数据更新自动刷新视图。 @BindingAdapter 这个注解用于支持自定义属性,或者是修改原有属性。 下面就开始实践使用: @Bindable 这个注解的理解还是十分简单的。 接下来我们看一下如何在代码里实现: class StudentInfo : BaseObservable() { @get:Bindable var name: String? = null @get:Bindable var age: Int = 0 @get:Bindable var sex: String? = null @get:Bindable var score: Int = 0 } 这样,我们的实体类就完成了。具体的使用方法和效果,我们在之后讲解双向绑定的时候会着重介绍。

    2.5K40发布于 2019-06-15
  • 来自专栏后端进阶

    Apache Calcite 框架 50 倍性能优化实践

    我们先从 Bindable 对象讲起: 在 EnumerableRel(RelNode,我们可以通过 TranslatableTable 自定义 FilterRel、JoinRel、AggregateRel 在moreNext方法中,有Stream和谓词下推filter部分的实现,在本文只关注如下几行代码: 总结执行顺序: 1、executeQuery 方法: 1)根据算子 linq4j 表达式子生成 Bindable 执行对象,如果有设置缓存,则会将对像存储到缓存中; 2)生成 CalciteResultSet 时会调用 Bindable#bind 方法返回一个 Enumerable 对象; 2、getData 方法 :调用 ResultSet#next 方法最终会嗲用 Enumerable#moveNext 一图理解 Bindable 在 calcite 中的作用: ? 发现 Bindable 缓存会持续增加,说明 Bindable 类内容不一致: ? 也说明了 calcite 会根据不同的 SQL 动态生成 linq4j 表达式。

    6.3K10发布于 2021-01-28
  • 来自专栏LeoXu的博客

    Flex笔记_MX DataGrid、列表和树

    [CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection [CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection [CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection [CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection [CDATA[ import mx.collections.ArrayCollection; import mx.events.ListEvent; [Bindable] public

    3.2K20发布于 2018-08-15
  • 来自专栏林德熙的博客

    读 MAUI 源代码 理解可绑定对象和可绑定属性的存储机制

    class BindableProperty { public delegate object CreateDefaultValueDelegate(BindableObject bindable ) => ((IFontElement)bindable).FontSizeDefaultValueCreator(); 也就是说对于不同的可绑定对象,获取到的默认的字体大小是根据对应的可绑定对象的 ("RowDefinitions", typeof(RowDefinitionCollection), typeof(Grid), null, validateValue: (bindable = null, propertyChanged: UpdateSizeChangedHandlers, defaultValueCreator: bindable => var rowDef = new RowDefinitionCollection(); rowDef.ItemSizeChanged += ((Grid)bindable

    1.4K20编辑于 2023-04-07
  • 来自专栏码匠的流水账

    聊聊springboot的logging.group

    ConfigurationPropertyName LOGGING_GROUP = ConfigurationPropertyName.of("logging.group");private static final Bindable <Map<String, LogLevel>> STRING_LOGLEVEL_MAP = Bindable.mapOf(String.class,LogLevel.class);private static final Bindable<Map<String, List<String>>> STRING_STRINGS_MAP = Bindable.of(ResolvableType.forClassWithGenerics

    31500编辑于 2023-12-02
  • 来自专栏码匠的流水账

    聊聊springboot的logging.group

    ConfigurationPropertyName LOGGING_GROUP = ConfigurationPropertyName.of("logging.group"); private static final Bindable <Map<String, LogLevel>> STRING_LOGLEVEL_MAP = Bindable.mapOf(String.class, LogLevel.class); private static final Bindable<Map<String, List<String>>> STRING_STRINGS_MAP = Bindable .of(ResolvableType.forClassWithGenerics

    26310编辑于 2023-12-02
领券