【文件属性】:
文件名称:grails-plugin-experiment:测试Grails插件开发的地方
文件大小:331KB
文件格式:ZIP
更新时间:2021-05-25 13:47:43
Groovy
Grails插件实验
定义Grails 3.0插件域类是可扩展的
SO的详细信息:
该项目包含一个名为security的插件和一个名为bookstore的应用程序以测试该插件。
插件用户:
org.centerkey.grails.User
应用程序用户(扩展插件用户):
com.example.BookstoreUser
试试看
生成插件并运行测试应用程序: $ ./gradlew bookstore:run
打开:
点击链接创建用户
挑战
SecurityService中的createUser()方法如何保存新用户?
user.save(flush: true) //the class in the database is actually BookstoreUser
还是应该设计插件以允许应用程序扩展域类的其他方式?
【文件预览】:
grails-plugin-experiment-master
----.gitignore(61B)
----settings.gradle(32B)
----gradlew(5KB)
----LICENSE(11KB)
----security()
--------build.gradle(2KB)
--------src()
--------gradlew(5KB)
--------gradlew.bat(2KB)
--------gradle.properties(45B)
--------gradle()
--------grails-app()
----bookstore()
--------build.gradle(2KB)
--------gradlew(5KB)
--------gradlew.bat(2KB)
--------gradle.properties(45B)
--------gradle()
--------grails-app()
----README.md(839B)
----gradlew.bat(2KB)
----gradle()
--------wrapper()