我正在 spring roo 中使用脚本命令来创建我正在开发的应用程序。
这是我正在使用的 roo 脚本。
project --topLevelPackage is.kdh.cyberdojo --projectName cyberdojo --java 6 --packaging WAR
jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity jpa --class ~.domain.Attendance --testAutomatically --table ATTENDANCE
field date --fieldName attended --type java.util.Date --notNull --column ATTENDED
entity jpa --class ~.domain.BarCode --testAutomatically --table BARCODE
entity jpa --class ~.domain.Person --testAutomatically --table PERSON
field string --fieldName socialSecurityNumber --sizeMax 10 --notNull --column SOCIAL_SECURITY_NUMBER --unique true
field string --fieldName name --sizeMax 128 --notNull --column NAME
field string --fieldName address --sizeMax 128 --notNull --column ADDRESS
field string --fieldName city --sizeMax 128 --notNull --column CITY
field string --fieldName phone --sizeMax 128 --notNull --column PHONE
field string --fieldName mobile --sizeMax 24 --notNull --column MOBILE
field string --fieldName email --sizeMax 128 --notNull --column EMAIL
field date --fieldName created --type java.util.Date --notNull --column CREATED
field date --fieldName modified --type java.util.Date --notNull --column MODIFIED
field boolean --fieldName active --column ACTIVE --notNull --value true
field string --fieldName registrationNumber --column REGISTRATION_NUMBER --notNull --sizeMax 10
field string --fieldName comments --column COMMENTS --sizeMax 4096
field reference --fieldName parent --type is.kdh.cyberdojo.domain.Person --cardinality MANY_TO_ONE
field reference --fieldName barCode --type is.kdh.cyberdojo.domain.BarCode --cardinality ONE_TO_ONE
entity jpa --class ~.domain.Course --testAutomatically --table COURSE
field string --fieldName name --sizeMax 128 --notNull --column NAME
field string --fieldName description --sizeMax 2048 --notNull --column DESCRIPTION
field boolean --fieldName active --notNull --column ACTIVE
field date --fieldName validFrom --type java.util.Date --notNull --column VALID_FROM
field date --fieldName validTo --type java.util.Date --notNull --column VALID_TO
field number --fieldName occurrence --type int --notNull --column OCCURRENCE
field set --fieldName instructors --type is.kdh.cyberdojo.domain.Person
entity jpa --class ~.domain.UserType --testAutomatically --table USERTYPE
field string --fieldName name --sizeMax 128 --notNull --column NAME
test integration
perform tests
web jsf setup --implementation APACHE_MYFACES --theme EGGPLANT
web jsf all --package ~.jsf
logging setup --level WARN --package WEB
perform eclipse
security setup
quit
一切都很好,直到我到达安全设置命令 - 然后脚本执行被中止。
roo 打印出的消息是
Command 'security setup' was found but is not currently available (type 'help' then ENTER to learn about this command)
我知道可以将 spring security 和 jsf 一起使用。我设置 roo 脚本的方式有什么问题吗?
顺便说一句:如果我使用 mvc 而不是 jsf,那么 spring security 就设置得很好,一切都工作正常。
最佳答案
问题已讨论here 。 您所指的修复仅包括禁用 JSF 和 GWT 插件的安全命令。 我们必须等到1.3.0。 :(
关于spring - 无法在 Spring Roo 中使用 JSF 设置 Spring Security,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11596555/