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
curl -X POST -d @file server:port -w %{time_connect}:%{time_starttransfer}:%{time_total} | |
curl -i -w %{time_connect}:%{time_starttransfer}:%{time_total} -H "Accept: application/json" localhost:8080/cms/api/menus | |
curl -s -w "%{time_total}\n" -H "Accept: application/json" localhost:8080/cms/api/menus |
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
import groovy.sql.Sql | |
class DataService { | |
def dataSource | |
void runQuery(...) { | |
def sql = new Sql(dataSource) | |
sql.eachRow('select * from foo') { row -> | |
... |
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
private void saveDomainClassProperties(String domainClassName, Map newProperties) { | |
log.info "domainClass : $domainClassName" | |
def domainClassInstance = grailsApplication.getDomainClass(domainClassName).newInstance() | |
domainClassInstance.properties = newProperties | |
domainClassInstance.save(flush: true) | |
} |