Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/384.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在JDBI3升级中更改BinderFactory实现_Java_Dropwizard_Jdbi - Fatal编程技术网

Java 如何在JDBI3升级中更改BinderFactory实现

Java 如何在JDBI3升级中更改BinderFactory实现,java,dropwizard,jdbi,Java,Dropwizard,Jdbi,目前,我正在从JDBI2升级到JDBI3,但似乎没有明显的BinderFactory翻译,升级文档中也没有提到 import org.skife.jdbi.v2.sqlobject.Binder; import org.skife.jdbi.v2.sqlobject.BinderFactory; import org.skife.jdbi.v2.sqlobject.BindingAnnotation; @BindingAnnotation(LoadTypeBinder.LoadTypeBind

目前,我正在从JDBI2升级到JDBI3,但似乎没有明显的BinderFactory翻译,升级文档中也没有提到

import org.skife.jdbi.v2.sqlobject.Binder;
import org.skife.jdbi.v2.sqlobject.BinderFactory;
import org.skife.jdbi.v2.sqlobject.BindingAnnotation;

@BindingAnnotation(LoadTypeBinder.LoadTypeBinderFactory.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER})
public @interface LoadTypeBinder {

    /**
     * Value.
     *
     * @return
     */
    String value() default "it";

    class LoadTypeBinderFactory implements BinderFactory {

        @Override
        public Binder build(Annotation annotation) {
            return (Binder<LoadTypeBinder, SolrDbDao.LoadType>)
                (q, bind, arg) -> q.bind(bind.value(), arg.value());
        }
    }
}
import org.skife.jdbi.v2.sqlobject.Binder;
导入org.skife.jdbi.v2.sqlobject.BinderFactory;
导入org.skife.jdbi.v2.sqlobject.BindingAnnotation;
@BindingAnnotation(LoadTypeBinder.LoadTypeBinderFactory.class)
@保留(RetentionPolicy.RUNTIME)
@目标({ElementType.PARAMETER})
public@interface LoadTypeBinder{
/**
*价值观。
*
*@返回
*/
字符串值()默认为“it”;
类LoadTypeBinderFactory实现BinderFactory{
@凌驾
公共活页夹生成(注释){
退货(活页夹)
(q,bind,arg)->q.bind(bind.value(),arg.value());
}
}
}

尝试一下JDBI邮件列表。它更有可能在那里得到回应。