Category Archives: Grails

debug grails3

grails run-app –debug-jvm setup elicpse install gradle plugin install groovy http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/ import project select build xxx https://tedvinke.wordpress.com/2015/10/17/eclipse-mars-grails-3-1-with-gradle-groovy-and-gsp-support/ debug remote java application http://stackoverflow.com/questions/21847441/debug-grails-application-in-eclipse-ide You can start a Grails app (one that has an Eclipse Grails nature, i.e. it was created in … Continue reading

Posted in Grails, Uncategorized | Leave a comment

bootstrap not run

need to include it in the package, ie., first line in the bootstrap.groovy need to be “package xxx”

Posted in Grails | Leave a comment

rendered character mess up

set the character set in grails-app/conf/application.groovy grails.converters.encoding = “UTF-8” if use view, then grails.views.default.codec = “html” grails.views.gsp.encoding = “UTF-8” http://stackoverflow.com/questions/10511497/grails-not-encoding-the-unicode-characters-properly

Posted in Grails, Uncategorized | Leave a comment

permitAll – 401 unauthorized

grails-app/conf/application.groovy the following need to be added grails.plugin.springsecurity.filterChain.chainMap = [ [ [pattern: ‘/api/offer/getTemplate**’, filters: ‘anonymousAuthenticationFilter,restTokenValidationFilter,restExceptionTranslationFilter,filterInvocationInterceptor’], the following is not necessary grails.plugin.springsecurity.controllerAnnotations.staticRules = [ [pattern: ‘/’, access: [‘permitAll’]], within controller the following is needed class ShippingController { def springSecurityService @Secured(‘permitAll’) def … Continue reading

Posted in Grails, Uncategorized | Leave a comment

groovy split string

use .tokenize(“.”), .split(“.”) not work

Posted in Grails, Uncategorized | Leave a comment

how to change the js order in asset pipeline

change the file name

Posted in Grails | Leave a comment

sql can be used in grails

http://stackoverflow.com/questions/6282374/grails-sql-queries With Grails you can use Dynamic Finders, Criteria Builders, Hibernate Query Language (HQL), or Groovy SQL. To use Groovy SQL: import groovy.sql.Sql Request a reference to the datasource with def dataSource or def sessionFactory for transactions Create an Sql … Continue reading

Posted in Grails | Leave a comment