2017-10-20 66 views
0

当我使用anotations像主题目前,它给我的错误Deadbolt 2 playframwork 2.5与注释有关的问题?

[ConfigurationException的:吉斯配置错误: 1)be.objectify.deadbolt.java.cache.HandlerCache没有实现是必然。 而在be.objectify.deadbolt.java.actions.SubjectNotPresentAction定位be.objectify.deadbolt.java.cache.HandlerCache 为参数0。(SubjectNotPresentAction.java:45) 而定位be.objectify.deadbolt.java.actions .SubjectNotPresentAction 2)未绑定be.objectify.deadbolt.java.cache.PatternCache。 而定位be.objectify.deadbolt.java.cache.PatternCache 在be.objectify.deadbolt.java.ConstraintLogic参数2。(ConstraintLogic.java:43) 而定位be.objectify.deadbolt.java.ConstraintLogic 为参数3在be.objectify.deadbolt.java.actions.SubjectNotPresentAction。(SubjectNotPresentAction.java:45) while being be.objectify.deadbolt.java.actions.SubjectNotPresentAction 3)没有实现be.objectify.deadbolt.java。缓存。主题缓存被绑定。 而定位be.objectify.deadbolt.java.cache.SubjectCache 在be.objectify.deadbolt.java.ConstraintLogic参数1。(ConstraintLogic.java:43) 而定位be.objectify.deadbolt.java.ConstraintLogic 为参数3在be.objectify.deadbolt.java.actions.SubjectNotPresentAction。(SubjectNotPresentAction.java:45) 而定位be.objectify.deadbolt.java.actions.SubjectNotPresentAction 3个错误]

我有我已经实现主题,角色和权限,还实现了HandlerCache和DeadboltHandler以及DeadboltHook。 万能工作,但是当我使用注释它给出了错误。

回答

0
play { 
    modules { 
    enabled += "be.objectify.deadbolt.java.DeadboltModule", 
    enabled += "modules.CustomDeadboltHook" 
    } 
} 

把这段代码放在你的application.conf文件中。是

modules { 
    enabled += "be.objectify.deadbolt.java.DeadboltModule", 
    enabled += "modules.CustomDeadboltHook" 
    } 

它解决了您的问题。