0

Currently I have a Play! 2.1 project that is a sub-project of an SBT Multi-Project that is a front-end interface. The Play! project uses SecureSocial for typical authentication.

I will typically first start the SBT console to run my internal services locally in separate terminals. Finally I perform a play "project interface" "~run 9000" command in a new window to start up the interface sub-project using Play!. Problem is that on a fresh load (even after a clean) SecureSocial does not use my extended services and providers, and instead falls back on its own.

I will make a source change and reload, where SecureSocial will then use my own classes but suddenly starts throwing ClassCast exceptions using two of the same types, indicating there are conflicting ClassLoaders.

Is there a proper way to set this up so this doesn't happen? Thanks for your help!

4

1 回答 1

0

虽然不是真正的解决方案,但我同时开发了一种解决方法,我手动实例化我自己的扩展UserService类并将当前的 Application 实例纳入范围。我还编写了自己的提供程序和SecureAction包装器,并将它们设计为使用自定义的UserService. 这是很多额外的代码,但可以解决这个问题。

于 2013-11-15T05:15:31.163 回答