Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
296418f
commit 16d95b1
Showing
8 changed files
with
84 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
./gradlew -Ddisable.groovydocs=true -Dgrails.home=../dev docs | ||
./gradlew -Ddisable.groovydocs=true -Dgrails.home=../dev publishGuide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Grails 3.1 is at the milestone stage, but already includes the following new features. | ||
|
||
h4. Spring Boot 1.3 and Spring 4.2 | ||
|
||
Grails 3.1 has been upgraded to Spring Boot 1.3 and Spring 4.2. | ||
|
||
h4. REST Profile | ||
|
||
A new profile is available designed for the creation of pure REST applications without a UI. | ||
|
||
To create a REST application use the @web-api@ profile as an argument to [create-app|commandLine]: | ||
|
||
{code} | ||
$ grails create-app myapp --profile=web-api | ||
{code} | ||
|
||
Then start interactive mode to see the available commands for the profile: | ||
|
||
{code} | ||
$ cd myapp | ||
$ grails | ||
{code} | ||
|
||
If you hit TAB you will notice code generation commands specific to the profile including: | ||
|
||
* @create-domain-resource@ - Creates a domain class annotated with the [Resource|api:grails.rest.Resource] annotation) | ||
* @create-restful-controller@ - Creates a controller that extends [RestfulController|api:grails.rest.RestfulController]. | ||
|
||
h4. JSON and Markup Views | ||
|
||
The REST profile includes the ability to define [JSON and Markup views|https://github.com/grails/grails-views] and the @build.gradle@ features the ability to compile these views for production use. | ||
|
||
The REST profile also creates [JSON views|https://github.com/grails/grails-views] to render the @index@ action and common commands such as [generate-views|commandLine] have been overridden to generate JSON views. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This guide takes you through the fundamentals of upgrading a Grails 2.x application or plugins to Grails 3.x. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Generally to upgrade an application from Grails 3.0 you can simply modify the version of Grails in @gradle.properties@. | ||
|
||
There are however some differences to Grails 3.0.x that are documented below. | ||
|
||
h4. Spring Boot 1.3 and Spring 4.2 | ||
|
||
Grails 3.1 ships with upgraded third party libraries that may require changes. See the [Spring Boot upgrade notes|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.3-Release-Notes] for information. | ||
|
||
h4. Resource annotation defaults to JSON instead of XML | ||
|
||
The [Resource|api:grails.rest.Resource] annotation applied to domain classes defaults to XML in Grails 3.0.x, but in Grails 3.1.x and above it defaults to JSON. | ||
|
||
If you use this annotation with the expecation of produces XML responses as the default you can modify the definition as follows: | ||
|
||
{code} | ||
import grails.rest.* | ||
|
||
@Resource(formats=['xml', 'json']) | ||
class MyDomainClass {} | ||
{code} | ||
|
||
This will restore the Grails 3.0.x behavior. | ||
|
||
h4. Geb and HTMLUnit 2.18 | ||
|
||
If you use Geb with HTMLUnit (something that is not recommended, as a more native driver such as PhantomJS is recommended) you will need to upgrade your dependencies in @build.grade@: | ||
|
||
{code} | ||
testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1' | ||
testRuntime 'net.sourceforge.htmlunit:htmlunit:2.18' | ||
{code} | ||
|
||
Note that there are also some changes in behavior in HTMLUnit 2.18 that may cause issues in existing tests including: | ||
|
||
* Expressions that evaluate the title (Example @$('title')@) now return blank and should be replaced with just @title@ | ||
* If you return plain text in a response without surrounding HTML tags, these are no longer regarded as valid responses and should be wrapped in the required tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters