- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的要求之一是在使用 Spring Roo 进行开发时实现身份验证。我找到了 gvNix,它具有典型的安全性,看起来非常有前途。
但是,请按照 Typical security - getting started 中的示例进行操作我无法让它工作。
project --topLevelPackage com.testproject2 --projectName TestProject2
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
typicalsecurity setup
<Exit gvNIX>>
mvn tomcat:run
问题:谁能给我一个基本的。欢迎任何帮助!
以下是命令行控制台的内容。
D:\Source\TypicalSecurity>\Tools\gvNIX-1.4.1\bin\gvnix.bat
____ ____ ____
/ __ \/ __ \/ __ \
/ /_/ / / / / / / /
/ _, _/ /_/ / /_/ / gvNIX 1.4.1.RELEASE distribution
/_/ |_|\____/\____/ 1.3.1.RELEASE [rev 8cb81a3]
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo-gvNIX> project --topLevelPackage com.testproject2 --projectName TestProject2
Created ROOT\pom.xml
Created SRC_MAIN_RESOURCES
Created SRC_MAIN_RESOURCES\log4j.properties
Created SPRING_CONFIG_ROOT
Created SPRING_CONFIG_ROOT\applicationContext.xml
roo-gvNIX> persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
Created SRC_MAIN_RESOURCES\dynamic-configuration.xml
Created SPRING_CONFIG_ROOT\database.properties
Updated SPRING_CONFIG_ROOT\applicationContext.xml
Created SRC_MAIN_RESOURCES\META-INF\persistence.xml
Updated ROOT\pom.xml [added dependencies org.hsqldb:hsqldb:2.2.9, org.hibernate:hibernate-core:4.3.6.Final, org.hibernate:hibernate-entitymanager:4.3.6.Final, org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final, commons-collections:commons-collections:3.2.1, org.hibernate:hibernate-validator:4.3.2.Final, javax.validation:validation-api:1.0.0.GA, javax.transaction:jta:1.1, org.springframework:spring-jdbc:${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.6, commons-dbcp:commons-dbcp:1.4]
roo-gvNIX> typicalsecurity setup
Created SRC_MAIN_JAVA\com\testproject2\domain
Created SRC_MAIN_JAVA\com\testproject2\domain\User.java
Created SRC_TEST_JAVA\com\testproject2\domain
Created SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand.java
Created SRC_TEST_JAVA\com\testproject2\domain\UserIntegrationTest.java
Updated ROOT\pom.xml [added dependency net.tanesha.recaptcha4j:recaptcha4j:0.0.7]
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Configurable.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_Entity.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_ToString.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_Configurable.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserIntegrationTest_Roo_Configurable.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserIntegrationTest_Roo_IntegrationTest.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_JavaBean.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\Role.java
Created SRC_TEST_JAVA\com\testproject2\domain\RoleDataOnDemand.java
Created SRC_TEST_JAVA\com\testproject2\domain\RoleIntegrationTest.java
Created SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_Configurable.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_Jpa_Entity.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_ToString.aj
Created SRC_TEST_JAVA\com\testproject2\domain\RoleIntegrationTest_Roo_Configurable.aj
Created SRC_TEST_JAVA\com\testproject2\domain\RoleDataOnDemand_Roo_DataOnDemand.aj
Created SRC_TEST_JAVA\com\testproject2\domain\RoleIntegrationTest_Roo_IntegrationTest.aj
Created SRC_TEST_JAVA\com\testproject2\domain\RoleDataOnDemand_Roo_Configurable.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\Role.java
Updated SRC_TEST_JAVA\com\testproject2\domain\RoleDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\Role.java
Updated SRC_TEST_JAVA\com\testproject2\domain\RoleDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\Role_Roo_JavaBean.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole.java
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleDataOnDemand.java
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleIntegrationTest.java
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Configurable.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Jpa_Entity.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_ToString.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleIntegrationTest_Roo_Configurable.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleDataOnDemand_Roo_DataOnDemand.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleIntegrationTest_Roo_IntegrationTest.aj
Created SRC_TEST_JAVA\com\testproject2\domain\UserRoleDataOnDemand_Roo_Configurable.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserRoleDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole.java
Updated SRC_TEST_JAVA\com\testproject2\domain\UserRoleDataOnDemand_Roo_DataOnDemand.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Jpa_ActiveRecord.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_JavaBean.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Created SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Finder.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\User.java
Updated SRC_MAIN_JAVA\com\testproject2\domain\User_Roo_Finder.aj
Updated SRC_MAIN_JAVA\com\testproject2\domain\UserRole.java
Created SRC_MAIN_JAVA\com\testproject2\domain\UserRole_Roo_Finder.aj
Command 'web mvc scaffold --class ~.web.UserController --backingType ~.domain.User' was found but is not currently available (type 'help' then ENTER to learn about this command)
Command 'web mvc scaffold --class ~.web.RoleController --backingType ~.domain.Role' was found but is not currently available (type 'help' then ENTER to learn about this command)
Command 'web mvc scaffold --class ~.web.UserRoleController --backingType ~.domain.UserRole' was found but is not currently available (type 'help' then ENTER to learn about this command)
Command 'security setup' was found but is not currently available (type 'help' then ENTER to learn about this command)
Created ROOT\src\main\webapp\WEB-INF\views\forgotpassword
Created ROOT\src\main\webapp\WEB-INF\views\forgotpassword\views.xml
Undo create ROOT\src\main\webapp\WEB-INF\views\forgotpassword\views.xml
Undo create ROOT\src\main\webapp\WEB-INF\views\forgotpassword
Could not acquire D:\Source\TypicalSecurity\src\main\webapp\WEB-INF/i18n/application.properties
~.domain.UserRole roo-gvNIX> exit
D:\Source\TypicalSecurity>mvn tomcat:run
[INFO] Scanning for projects...
Downloading: http://maven.springframework.org/release/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloading: http://maven.springframework.org/milestone/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloading: http://spring-roo-repository.springsource.org/release/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom (6 KB at 14.2 KB/sec)
Downloading: http://maven.springframework.org/milestone/org/apache/maven/plugins/maven-metadata.xml
...
Downloaded: https://repo.maven.apache.org/maven2/net/tanesha/recaptcha4j/recaptcha4j/0.0.7/recaptcha4j-0.0.7.jar (11 KB at 196.2 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/hibernate/hibernate-entitymanager/4.3.6.Final/hibernate-entitymanager-4.3.6.Final.jar (632 KB at 1585.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/hibernate/hibernate-validator/4.3.2.Final/hibernate-validator-4.3.2.Final.jar (474 KB at 1467.2 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar (698 KB at 1453.0 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/hibernate/hibernate-core/4.3.6.Final/hibernate-core-4.3.6.Final.jar (5131 KB at 1960.6 KB/sec)
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:compile (default) @ TestProject2 ---
Downloading: http://maven.springframework.org/release/org/aspectj/aspectjtools/1.8.1/aspectjtools-1.8.1.pom
Downloaded: http://maven.springframework.org/release/org/aspectj/aspectjtools/1.8.1/aspectjtools-1.8.1.pom (1022 B at 1.8 KB/sec)
Downloading: http://maven.springframework.org/release/org/aspectj/aspectjtools/1.8.1/aspectjtools-1.8.1.jar
Downloaded: http://maven.springframework.org/release/org/aspectj/aspectjtools/1.8.1/aspectjtools-1.8.1.jar (10721 KB at 972.1 KB/sec)
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:test-compile (default) @ TestProject2 ---
[WARNING] this affected type is not exposed to the weaver: com.testproject2.domain.Role [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: com.testproject2.domain.User [Xlint:typeNotExposedToWeaver]
[WARNING] this affected type is not exposed to the weaver: com.testproject2.domain.UserRole [Xlint:typeNotExposedToWeaver]
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestProject2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ TestProject2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) < compile @ TestProject2 <<<
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ TestProject2 ---
[INFO] Skipping non-war project
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 min
[INFO] Finished at: 2015-06-09T18:59:50+02:00
[INFO] Final Memory: 14M/44M
[INFO] ------------------------------------------------------------------------
D:\Source\TypicalSecurity>
最佳答案
此插件包含部分网页,因此需要安装Web MVC层。尝试这个命令序列:
project --topLevelPackage com.testproject2 --projectName TestProject2
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
// You should include any simple entity
web mvc setup
web mvc scaffold all --package com.testproject2.web
typicalsecurity setup
如果您想要有关此功能的完整示例,请尝试以下操作:
// First run the petclinc roo example
script --file clinic.roo
// install typical security assets
typicalsecurity setup
祝你好运!!
关于java - 如何使用 gvNix 典型安全性?入门不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30738830/
我正在尝试构建一个托管在服务器上的 Blazor 应用程序,起点位于一个 razor 页面内。 类似的东西: 我的问题是: 如果 Razor 页面具有授权属性,所有 blazor 代码都不是通过身份
对tomcat中管道和阀门机制不懂的小伙伴,参考本篇文章 领域 目前可知结构,如图所示,下面继续分析 GenericPrincipal类 LoginConfig类 Authenticator接口 在T
我刚刚开始学习 React 中的授权和身份验证,我在使用 JWT 完成我的第一个简单登录系统后编写了这篇文章,因为大多数人都知道您在浏览器中存储了一个 token ,然后将其与保存的进行比较现在,当验
我正在为grails项目寻找安全插件。 Spring安全核心1.2.7.3看起来很棒,但是似乎已经有将近一年没有开发了。有谁知道是这样吗? 还有其他好的插件吗? 我也正在使用mongodb,想知道sp
我有一个 WCF 服务,它使用具有消息安全性和用户名身份验证的 NetTcpBinding。在此之前,我使用 WsHttpBinding 但我切换到 NetTcp,因为我可以使用回调。 我的服务配置如
我正在考虑使用 cakePHP 构建一个 Web 应用程序。我的问题是我必须自己编写多少安全内容来防止(SQL 注入(inject)等)? cakePHP 自己处理什么安全问题,我必须编写什么代码?
任何人都有关于为安全环境强化/配置 TFS 的信息? 最佳答案 TFS 使用 Windows 身份验证,因此它与您的网络一样安全。我建议您还查看有关加强网络安全的资源。 Team Foundation
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我一直想知道 codeigniter 设置有多安全。因为数据库密码等信息存储在主应用程序文件夹的配置文件中,黑客可以检索到这些信息吗?我知道您可以将应用程序文件夹移动到远离 Web 根目录的位置,但如
在客户端使用 PouchDB 访问远程服务器时要遵循的最佳安全实践是什么? https://pouchdb.com/getting-started.html上的例子使用代码与远程服务器同步: var
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我正在开发一个网络应用程序,用户可以在其中上传文件并执行它们。我的意思是,他们可以上传 html 文件,然后通过单击,他们可以在我的 Web 应用程序内的 iframe 中执行该文件并查看渲染的 ht
试图澄清 -AsPlainText ConvertTo-SecureString 中的参数小命令: -AsPlainText Specifies a plain text string to conv
我正在玩 coreos 和 digitalocean,我想开始允许我的容器之间进行内部通信。 我已经为所有主机设置了私有(private)网络,现在我想确保某些容器只打开到 localhost 和内部
我们有两台机器: 服务器 客户 服务器正在运行 Clojure + Ring + ...标准 ClojureScript webstack。 客户端 = 某些运行 Chorme/Firefox/Saf
让我们有一个函数 foo 和一个类 Bar: fun foo(key: String): String? { // returns string or null } class Bar(x: St
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
确保只有正确的用户才能在 Sharepoint 2007 中看到 Web 部件的最佳做法是什么? 有人向我建议了安全组和受众。 最佳答案 这取决于您是在谈论 Web 部件的呈现还是从 Web 部件库添
我试图说服一个团队,使用 jQuery JSONP 调用与不受信任的第三方可能是不安全的。我正在使用标准 jQuery 代码: $.ajax({ url:unsecureserver+"?js
我有以下ajax调用,它检查用户是否是付费成员(member),如果是,则相应地运行某些功能。这可行,但我担心安全性。如果有人在控制台中更改此 ajax 代码,强制 #button 成功运行功能而无需
我是一名优秀的程序员,十分优秀!