Tutorial by Examples

import grails.rest.* @Resource(uri='/books') class Book { String title static constraints = { title blank:false } } Simply by adding the Resource transformation and specifying a URI, your domain class will automatically be available as a REST resource in either XM...
If you prefer to keep the declaration of the URL mapping in your UrlMappings.groovy file then simply removing the uri attribute of the Resource transformation and adding the following line to UrlMappings.groovy will suffice: "/books"(resources:"book") Extending your API to in...
SSL Certificates use something called public key cryptography.We need to use Https instead of Http because of keeping data secure between servers and improving customer trust. To enable this option in grails, we have to run our app differently. The command below: grails run-app -https

Page 1 of 1