Shiro.ini文件配置但是在Java类中?

时间:2014-12-02 07:54:31

标签: java shiro

我想知道是否可以在没有shiro.ini文件的情况下配置Shiro,我的意思是,如果我需要让Shiro配置在Java类中进行硬编码,而不是使用INI文件?

3 个答案:

答案 0 :(得分:4)

是的,这是可能的。文档说明了如何做到这一点:

http://shiro.apache.org/configuration.html#Configuration-ProgrammaticConfiguration

答案 1 :(得分:2)

请参阅Credentials Matching

或使用jdbc自定义领域here

答案 2 :(得分:0)

是的,您可以通过

完成
[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.5: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.5 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[JENKINS] Archiving D:\maven\ISOListeners\TemenosBanking\pom.xml to COM.TEMENOS.BANK/ISOListeners/1.0-SNAPSHOT/ISOListeners-1.0-SNAPSHOT.pom
channel stopped
Finished: FAILURE

对于shiro.ini文件,请参阅this doc:

相关问题