grails-3.0

How do I publish a grails 3 plugin to my local nexus repo?

眉间皱痕 提交于 2020-01-01 05:00:05
问题 Running grails publish-plugin doesn't seem to do anything, and the only documentation I could find was about publishing to bintray. [edit:] I can publish the plugin via gradle publish , but wondered if there was a grails-y way to do it, and wonder what grails publish-plugin actually does :/ 回答1: I figured it out with help from Ryan Vanderwerf at http://rvanderwerf.blogspot.com/2015/07/how-to-publish-grails-3-plugin.html who writes that there are a bunch of spring-boot dependencies that don't

3.0.0.M1 how to run on https connection

夙愿已清 提交于 2019-12-24 02:42:28
问题 Trying Grails 3.0.0.M1, a lot has changed! How would I run-app --https and how would I configure it that way also for the production-environment-war? Many thanks! 回答1: First of all, Grails 3.0.0.M1 is not production ready, if thinking about making the move. Major changes for Grails 3 include: Built on top of Spring Boot Introduction of Gradle as the build system And many more (which is not relevant to this question) In order to setup SSL for Spring Boot app, server.ssl.* setting has to be

Create Grails 3 WAR without version number

僤鯓⒐⒋嵵緔 提交于 2019-12-23 08:45:48
问题 In Grails 2 we could define WAR filename like this: grails.project.war.file = "target/${appName}.war" How can I override the war filename in Grails 3? Thanks Jeff. I have added line like thisin build.gradle: war { archiveName "${war.baseName}.war" } 回答1: In build.gradle you can do something like war.archiveName='jeff.war' . See https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.War.html#org.gradle.api.tasks.bundling.War%3aarchiveName. 回答2: A more detailed answer: Add this to

Grails 3.0.9: Spock integration tests' @Rollback annotation is not working

时间秒杀一切 提交于 2019-12-22 11:32:58
问题 I'm currently working on some integration (or functional, I'm not really a QA but back-end dev, so I might be sloppy with terms) REST tests for our project, we are using Grails 3.0.9, Spock Framework 1.0-Groovy-2.4 and PostgreSQL DB for testing. Also we have separate DB for testing purposes, it is still crucial that changes are rolled back after each test. I have looked through Grails testing doc and was trying to use @Rollback annotation as described in examples - and it is just not working,

Configuring Spring Boot Security to use BCrypt password encoding in Grails 3.0

北城余情 提交于 2019-12-22 05:38:11
问题 In Grails 3.0, how do you specify that Spring Boot Security should use BCrypt for password encoding? The following lines should provide a sense of what I think needs to be done (but I'm mostly just guessing): import org.springframework.security.crypto.password.PasswordEncoder import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder PasswordEncoder passwordEncoder passwordEncoder(BCryptPasswordEncoder) My application loads spring-boot-starter-security as a dependency: build

Grails 3.0 <g:remoteLink …> Ajax call replacement due to deprecation

谁说我不能喝 提交于 2019-12-22 04:26:10
问题 Grails 3.0.0 M1 states that g:remoteLink is deprecated and in 3.0.1 it no longer exists in the g: namespace. There is nothing in the documentation that suggests replacement of this functionality. Will someone please respond with a replacement option for GSP files to execute a controller action using the Prototype JavaScript library? If also possible, would a solution utilizing a Groovy custom tag library to eliminate embedded code directly in GSP files be presented? 回答1: The tags use inline

How to enable CORS in Grails 3.0.1

筅森魡賤 提交于 2019-12-21 07:13:30
问题 I would like to do cross origin communication using Grails in server side. The only documentation that I found is this one https://grails.org/plugin/cors but this is for an old version of Grails. The other documentation that I found is for spring: https://spring.io/guides/gs/rest-service-cors/ so I added the file SimpleCorsFilter.groovy to init/myproject/ folder, but I don't know how to wire this component into resources.groovy 回答1: So, if you got here using grails 3.2.+ you can use the

Grails 3 and Spring @RequestMapping

≡放荡痞女 提交于 2019-12-20 07:04:09
问题 In Grails 3 I'm trying to use spring-security-oauth, which provides a few endpoints via the @RequestMapping I can see in the mbeans that the path is configured but any request always hits grails and returns a 404. The requests never seem to hit any of the endpoints configured by the spring-security-oauth lib. Is there anyway to insure the requests hit the endpoints in the jar? 回答1: To make sure the endpoints configured by @RequestMapping show in a Grails 3 app using Java config you have to

Grails 3 Automatic Reconnect with MS Sql Server

巧了我就是萌 提交于 2019-12-20 04:55:11
问题 I am developing a web application on Grails 3.2.2 with spring boot and hibernate and MS SQL Server as a backend database. I want my application to reconnect with the database automatically whenever SQL server comes back after a restart or any other issue. This is how my application.yml file database-related properties look like: development: dataSource: dbCreate: update url: jdbc:jtds:sqlserver://machine_host_name:1433/db_name?autoReconnect=true properties: jmxEnabled: true initialSize: 5

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