Questions tagged [grails-3.1]

Version 3.1 of the grails Open Source web application framework that uses the Spring, Hibernate, Groovy programming language, which is in turn based on the Java virtual machine (JVM) and Java. Use it in addition to the grails and grails-3 tags in specific question to grails 3.1.

From the Grails documentation:

What's new in Grails 3.1?

Grails 3.1 is at the milestone stage, but already includes the following new features.

Spring Boot 1.3 and Spring 4.2

Grails 3.1 has been upgraded to Spring Boot 1.3 and Spring 4.2.

Improvements to Grails 3 Profiles

Profile Publishing and Repositories

The following improvements are available in Grails profiles:

  • Profiles are now published as regular JAR files to any Maven compatible repository (Artifactory, Nexus etc.).
  • Additional profiles can be created easiy with the new create-profile command.
  • Profiles can now contribute to the generation of the build
  • Profiles can now have one or many features

For more information see the new section on Profiles in the user guide.

175 questions
2
votes
0 answers

Grails 3.1.9 missing command (create-functional-test)

I want migrate Geb functional tests from 1.3.7 to 3.1.9. Tried to create a new plain test with grails create-functional-test in IntelliJ an via console. Both failed with Command not found create-functional-test. I created a new application with…
se-jaeger
  • 111
  • 1
  • 5
2
votes
1 answer

How to get the Url where Grails 3.1.9 integration tests are running?

From Grails 3.1.9 relase notes: Integration Test Port Integration and functional tests now run on a random port instead of the same port as the application by default. This is to avoid port conflict problems when the application is…
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
2
votes
2 answers

Rendering static file as URI in Grails 3

In Grails 2.x, the following works: class UrlMappings { static mappings = { /** * Serving the index.html directly */ "/"(uri: "/ng/app/index.html") } } Given that there is a index.html file available in…
Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
2
votes
1 answer

Services files are not auto reloaded in grails 3.1.6

I have a Groovy service ReportService.groovy inside grails-app/services. When I make some changes in the file, console output is: File /home/username/project/grails-app/services/com/company/ReportService.groovy changed, recompiling... Spring…
sgiri
  • 691
  • 12
  • 28
2
votes
1 answer

unmarshalling domain class error in elastic search Grails

I'm trying to use ElasticSearch 1.0.0.2 in Grails 3.1.6. The domain class is: class Post { String content Date dateCreated static belongsTo = [user: User] static hasMany = [tags: Tag] static searchable = { tags component : true user…
2
votes
1 answer

Formatting java.time (jsr310) objects in Grails 3 JSON / rest-api

Trying to use the java.time API in Grails 3.1.x rest controllers. My domain object "Absence" has a field LocalDate date build.gradle contains compile "org.jadira.usertype:usertype.extended:5.0.0.GA" as a dependency and application.groovy…
runeaen
  • 461
  • 5
  • 22
2
votes
1 answer

Grails JSON Views - default date rendering

When using Marshallers, I could use something like: JSON.registerObjectMarshaller(Date) { return it?.format("yyyy-MM-dd'T'HH:mm:ss") } and it would make all Date objects render to JSON with that format. Is there an equivalent I can use with…
Anonymous1
  • 3,877
  • 3
  • 28
  • 42
2
votes
2 answers

ClassCastException for MappingFactory to ToMany while porting to grails 3

When trying to run command grails run-app --stacktrace, grails is throwing this error : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested…
Deepen
  • 193
  • 1
  • 12
2
votes
2 answers

Adding static resources (css,js,htm) to grails 3 application

I am beginner in grails. I would like to add some static resources to grails app and exclude them from url mappings. I’ve added the following line to UrlMappings groovy: class UrlMappings { static excludes = ['/resources/*'] ... But I don’t…
U.DOG
  • 47
  • 1
  • 8
2
votes
1 answer

Is possible to combine rest-api and angular profiles on Grails?

I'm going to start a new project that has two front ends, a mobile APP and a Web Application. I was thinking about creating a "rest-api" grails application and consume this "api" from the mobile apps. But, for the WebApp, is it possible to create…
jdevora
  • 186
  • 1
  • 7
2
votes
1 answer

Grails 3 Quartz plugin: Job doesn't start

I am trying to do a simple background job in Grails. I just want stuff to happen every 30 seconds or so. I am using Grails 3.1.3 I've added Quartz to my dependencies: compile "org.grails.plugins:quartz:2.0.1" Then I've run a compile and restarted…
Cola_Colin
  • 415
  • 5
  • 16
2
votes
1 answer

Gradle equivalent to 'grails -Dgrails.env=production run-app'

I'm upgrading my Grails 2.5.1 web-app to Grails 3.1.1. To run the app locally with production as active environment I used grails -Dgrails.env=production run-app Now I'm using Gradle tasks, in particular gradle bootRun. What's the easiest…
ilPittiz
  • 734
  • 1
  • 10
  • 23
2
votes
1 answer

Using java.util.Set domain property with Grails 3.1.x and Mongo 5.0.x plugin

I'm trying to create an embedded collection in a Grails GORM Mongo domain class. class User { String name Set friends = [] } I want to store a Set (a non-duplicated list) of other names of users. When I try to save the User domain…
hugheba
  • 33
  • 1
  • 5
2
votes
0 answers

Where do i add custom JAR files to Grails 3

I want to add my jars to the project and use them. What path relative to project should i put them? How do i configure it so they are included in classpath?
Arjang
  • 731
  • 1
  • 10
  • 19
2
votes
1 answer

Grails 3 - achieving customization of template in a way it was possible with _form.gsp in version 2

I am relatively new to Grails and I am little disappointed with the way _form.gsp removed with field plugin in Grails 3. _form.gsp seemed to be good time saving option when we need to customize views with Bootsrap or materialize. Now with grails 3,…
hemu
  • 3,199
  • 3
  • 44
  • 66