grails-plugin

What widget constraints are valid for Grails domain classes?

只谈情不闲聊 提交于 2019-12-21 17:09:14
问题 Can you tell me the list of valid values for the widget constraint below (some-widget), e.g.: static constraints = { someField(widget: 'some-widget') } The documentation seems to be missing. Related, do you know of any plugins that can work directly with this constraint? 回答1: You can have a look there It's an old list, but it's still valid, I think 回答2: From what I can tell, the widget property is only used for scaffolding and is referenced in the renderEditor.template. In that file, it

How to migrate Grails 2.1 to Grails 2.3 application?

守給你的承諾、 提交于 2019-12-21 05:16:37
问题 I am migrating my application from Grails 2.1 to 2.3. I am getting lot of errors after migration - I want some sample applications with Grails 2.3 and Spring integration. I did some HelloWorld sample applications, and those are working fine. But even I apply same thing in my application, even some where it is giving error. Because my application is very big(100mb) and i am using lot of integration with Spring, Hibernate, and lot of Grails plugins. I did not find any code level document for

Grails: disable Spring Security Core on certain paths

半腔热情 提交于 2019-12-20 03:19:43
问题 How do I set up Spring Security Core in a way that calls to a certain pattern (such as /api/**) are not filtered? grails.plugins.springsecurity.filterChain.chainMap = [ '/api/**': '', '/**': 'JOINED_FILTERS', ] doesn't work, since it will try to resolve the bean ''. Is there anything other than the nasty workaround with 'JOINED_FILTERS,-filter1,-filter2,...' How are static resources being excluded from Spring Security? 回答1: You need to add the anonymous filter to your filter chain. If you

How to make Grails get latest local jars from Maven repository?

纵饮孤独 提交于 2019-12-19 19:44:31
问题 In my Maven repo (.m2). there is one my local jar like sub_app-0.1.jar. I have same copy of the it in ivy-cache. I run maven install on sub_app then new sub_app-0.1.jar file created. After, I run grails clean and it not getting my new sub_app-0.1.jar from .m2. But, if I remove (delete) sub_app-0.1.jar file from ivy-cache and run the grails clean then it is getting new sub_app-0.1.jar file into ivy-cache. If I change the version in sub-app pom and grails pom and Grails is taking latest one.

Adding in-place plugin to grails 3 project

孤人 提交于 2019-12-19 08:18:16
问题 In grails 2.x, we were allowed to add an in place plugin by adding following in BuildConfig.groovy grails.plugin.location."my-plugin" = "../my-plugin" My question is, can we add our local plugins similarly in-place in grails3.0 as well or there is some other way to do this in grails. Actual purpose is to test the plugin whether it's working properly or not before pushing it to bintray. 回答1: Yes, there is. Grails 3 is based on Gradle so multi-project gradle builds solve your issue. Basically

Grails Redirect Post-Logout Using spring-security-core-3.0.6+

天大地大妈咪最大 提交于 2019-12-19 03:20:09
问题 In spring security version 3.0.6, which fixed a CRLF logout exploit (https://jira.springsource.org/browse/SEC-1790) they disabled the use of the 'spring-security-redirect' parameter. Default support for the redirect parameter in logout URLs has also been removed in 3.0.6. In 3.1 it already needs to be enabled explicitly. Is there a way to turn the redirect parameter back on, so that I can dynamically redirect in my Grails Spring Security Logout Controller? LogoutContoller.groovy def user =

Grails Send Mail is not working

戏子无情 提交于 2019-12-18 09:45:19
问题 I am using Mail Plugin to send email in my grails application. I am doing like this ... Config.groovy ---- grails { mail { host = "smtp.gmail.com" port = 465 username = "example@gmail.com" password = "*********" props = ["mail.smtp.auth":"true", "mail.smtp.socketFactory.port":"465", "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory", "mail.smtp.socketFactory.fallback":"false"] } } and Controller --- class MailController { def mailService def sendmail = { mailService.sendMail {

Grails spring security fails to present the login page due to a redirect loop

血红的双手。 提交于 2019-12-18 09:34:40
问题 I have upgraded my current spring security plugins to spring-security-core-2.0-RC2 spring-security-ui-1.0-RC1 PROBLEM and I noticed that my login screen no longer shows up. In Chrome it says This page has a redirect loop STEPS TO RECREATE THE PROBLEM So I have tried to create a brand new application called Test to try to isolate the problem. First, I installed the security and security-ui plugins by adding the following entries in the BuildConfig.groovy : compile ":spring-security-core:2.0

Grails Spring Security: redirect after login success/failure

大憨熊 提交于 2019-12-17 22:35:34
问题 I'm using version 1.2 of the Spring Security plugin in a Grails application. I want login attempts to be handled in the following way: Success if the login was triggered by an attempt to access a protected page, send them to that page if the user logged in "directly" redirect them back to the home page Failure Send them to a "try again" login page and populate the form thereon with the invalid login details they entered (except for the password fields). This "try again" login page is not the

No such property: developmentModeActive for class issue when run schema-export

﹥>﹥吖頭↗ 提交于 2019-12-14 02:35:30
问题 Environment: Grails Version: 3.0.3 Groovy Version: 2.4.3 JVM Version: 1.8.0_45 Steps: create app by create-app add classpath "org.grails.plugins:hibernate:4.3.8.1" to build.gradle run command grails schema-export The result is failed, the key error log: Exception in thread "Thread-11" groovy.lang.MissingPropertyException: No such property: developmentModeActive for class: grails.ui.command.GrailsApplicationContextCommandRunner Stacktrace: Possible solutions: developmentModeActive at org