【发布时间】:2017-02-16 01:12:08
【问题描述】:
来自https://github.com/wstrange/GoogleAuth
为用户设置凭据时:
GoogleAuthenticator gAuth = new GoogleAuthenticator();
final GoogleAuthenticatorKey key = gAuth.createCredentials("daryll123");
发生异常:
java.lang.UnsupportedOperationException: An instance of the com.warrenstrange.googleauth.ICredentialRepository service must be configured in order to use this feature.
如何使用ICredentialRepository 进行配置才能工作?
它在那里声明了 Java ServiceLoader API。不知道是怎么回事。
【问题讨论】: