Config.groovy 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // locations to search for config files that get merged into the main config
  2. // config files can either be Java properties files or ConfigSlurper scripts
  3. // grails.config.locations = [ "classpath:${appName}-config.properties",
  4. // "classpath:${appName}-config.groovy",
  5. // "file:${userHome}/.grails/${appName}-config.properties",
  6. // "file:${userHome}/.grails/${appName}-config.groovy"]
  7. // if (System.properties["${appName}.config.location"]) {
  8. // grails.config.locations << "file:" + System.properties["${appName}.config.location"]
  9. // }
  10. grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
  11. grails.app.context = '/grails'
  12. // The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
  13. grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
  14. grails.mime.types = [
  15. all: '*/*',
  16. atom: 'application/atom+xml',
  17. css: 'text/css',
  18. csv: 'text/csv',
  19. form: 'application/x-www-form-urlencoded',
  20. html: ['text/html','application/xhtml+xml'],
  21. js: 'text/javascript',
  22. json: ['application/json', 'text/json'],
  23. multipartForm: 'multipart/form-data',
  24. rss: 'application/rss+xml',
  25. text: 'text/plain',
  26. hal: ['application/hal+json','application/hal+xml'],
  27. xml: ['text/xml', 'application/xml']
  28. ]
  29. // URL Mapping Cache Max Size, defaults to 5000
  30. //grails.urlmapping.cache.maxsize = 1000
  31. // What URL patterns should be processed by the resources plugin
  32. grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
  33. // Legacy setting for codec used to encode data with ${}
  34. grails.views.default.codec = "html"
  35. // The default scope for controllers. May be prototype, session or singleton.
  36. // If unspecified, controllers are prototype scoped.
  37. grails.controllers.defaultScope = 'singleton'
  38. // GSP settings
  39. grails {
  40. views {
  41. gsp {
  42. encoding = 'UTF-8'
  43. htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
  44. codecs {
  45. expression = 'html' // escapes values inside ${}
  46. scriptlet = 'html' // escapes output from scriptlets in GSPs
  47. taglib = 'none' // escapes output from taglibs
  48. staticparts = 'none' // escapes output from static template parts
  49. }
  50. }
  51. // escapes all not-encoded output at final stage of outputting
  52. filteringCodecForContentType {
  53. //'text/html' = 'html'
  54. }
  55. }
  56. }
  57. grails.converters.encoding = "UTF-8"
  58. // enable Sitemesh preprocessing of GSP pages
  59. grails.views.gsp.sitemesh.preprocess = true
  60. // scaffolding templates configuration
  61. grails.scaffolding.templates.domainSuffix = 'Instance'
  62. // Set to false to use the new Grails 1.2 JSONBuilder in the render method
  63. grails.json.legacy.builder = false
  64. // enabled native2ascii conversion of i18n properties files
  65. grails.enable.native2ascii = true
  66. // packages to include in Spring bean scanning
  67. grails.spring.bean.packages = []
  68. // whether to disable processing of multi part requests
  69. grails.web.disable.multipart=false
  70. // request parameters to mask when logging exceptions
  71. grails.exceptionresolver.params.exclude = ['password']
  72. // disabling query cache
  73. grails.hibernate.cache.queries = false
  74. // OSIV is readonly by default
  75. grails.hibernate.osiv.readonly = true
  76. // set per-environment serverURL stem for creating absolute links
  77. environments {
  78. development {
  79. grails.logging.jul.usebridge = true
  80. }
  81. production {
  82. grails.logging.jul.usebridge = false
  83. // TODO: grails.serverURL = "http://www.changeme.com"
  84. }
  85. }
  86. // log4j configuration
  87. log4j = {
  88. // Example of changing the log pattern for the default console
  89. // appender:
  90. //
  91. //appenders {
  92. // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
  93. //}
  94. error 'org.codehaus.groovy.grails.web.servlet', // controllers
  95. 'org.codehaus.groovy.grails.web.pages', // GSP
  96. 'org.codehaus.groovy.grails.web.sitemesh', // layouts
  97. 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
  98. 'org.codehaus.groovy.grails.web.mapping', // URL mapping
  99. 'org.codehaus.groovy.grails.commons', // core / classloading
  100. 'org.codehaus.groovy.grails.plugins', // plugins
  101. 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
  102. 'org.springframework',
  103. 'org.hibernate',
  104. 'net.sf.ehcache.hibernate'
  105. }