tanamonの稀に良く書く日記

KEEP CALM AND DRINK BEER

Spring Rooの動作(18) - security setupコマンド

security setupコマンド

  • Spring Securityを利用した画面の認証・認可の制御を行えるようにする
  • コマンドを実行するには事前にコントローラクラスが1つ以上必要

オプション

なし

使い方

roo> entity --class BlankEntity
...
roo> controller all --package ~.web
...
roo> security setup
Managed ROOT\pom.xml
Managed ROOT\pom.xml [Added dependency org.springframework.security:spring-security-core:${spring-security.version}]
Managed ROOT\pom.xml [Added dependency org.springframework.security:spring-security-config:${spring-security.version}]
Managed ROOT\pom.xml [Added dependency org.springframework.security:spring-security-web:${spring-security.version}]
Managed ROOT\pom.xml [Added dependency org.springframework.security:spring-security-taglibs:${spring-security.version}]
Created SRC_MAIN_RESOURCES\META-INF\spring\applicationContext-security.xml
Created SRC_MAIN_WEBAPP\WEB-INF\views
Created SRC_MAIN_WEBAPP\WEB-INF\views\login.jspx
Managed SRC_MAIN_WEBAPP\WEB-INF\web.xml
Managed SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
~.web roo>

その他

  • 設定はSRC_MAIN_RESOURCES\META-INF\spring\applicationContext-security.xmlで行う