【发布时间】:2012-10-04 18:11:25
【问题描述】:
你好,我要如何对存储库进行编程配置,因为存储库中的大部分配置参数只能在运行时确定。
当我尝试打印它抛出 NPE 的会话时,我似乎无法使用匿名凭据 代码如下
config.repositorySource("store")
.usingClass(DiskSource.class)
.setProperty("repositoryRootPath", "c:/x/repo1")
.setProperty("defaultWorkspaceName","default");
config.repository("content")
.setOption(JcrRepository.Option.USE_ANONYMOUS_ACCESS_ON_FAILED_LOGIN, "true")
.setSource("store");
Session session = engine.getRepository("content").login("default");
我可以将自定义身份验证器添加到 JcrConfiguration 吗?
【问题讨论】:
-
NullPointerException 的堆栈跟踪是什么?
标签: authentication configuration jcr modeshape