dropwizard学习

基础知识

Posted by diqi on May 31, 2021

logback配置

logging:
  level: INFO
  appenders:
    - type: console
      logFormat: "[%d{ISO8601,UTC}] %c | [%F:%L] | %m%n%rEx"
      timeZone: UTC
      includeCallerData: true

includeCallerData: 在需要打印行号、函数名等需要堆栈信息的情况下需要设置为true
%F: 打印方法名
%L: 打印行号

TODO

final PolymorphicAuthDynamicFeature<Principal> feature = new PolymorphicAuthDynamicFeature<>(
                ImmutableMap.of());
final AbstractBinder binder = new PolymorphicAuthValueFactoryProvider.Binder<>(
                ImmutableSet.of());
environment.jersey().register(feature);
environment.jersey().register(binder);