Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メソッドで役割を構成するにはどうすればよいですaddFilterChainか??
addFilterChain
INIファイルでは、次のようなものです
[url] /secure/** = authc, roles[admin]
Java メソッドではどのようになりますか?
addFilterChain("/secure/**", ROLES);
ShiroWebModuleは、INI[]構文を模倣する「config」メソッドを提供します。
したがって、INI構成に相当するものは次のようになります。
addFilterChain("/secure/**", AUTHC, config(ROLES, "admin"));