Config.groovy
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:3k
源码类别:

PlugIns编程

开发平台:

Java

  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.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
  11. grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
  12.                       xml: ['text/xml', 'application/xml'],
  13.                       text: 'text-plain',
  14.                       js: 'text/javascript',
  15.                       rss: 'application/rss+xml',
  16.                       atom: 'application/atom+xml',
  17.                       css: 'text/css',
  18.                       csv: 'text/csv',
  19.                       all: '*/*',
  20.                       json: ['application/json','text/json'],
  21.                       form: 'application/x-www-form-urlencoded',
  22.                       multipartForm: 'multipart/form-data'
  23.                     ]
  24. // The default codec used to encode data with ${}
  25. grails.views.default.codec="none" // none, html, base64
  26. grails.views.gsp.encoding="UTF-8"
  27. grails.converters.encoding="UTF-8"
  28. // enabled native2ascii conversion of i18n properties files
  29. grails.enable.native2ascii = true
  30. // set per-environment serverURL stem for creating absolute links
  31. environments {
  32.     production {
  33.         grails.serverURL = "http://www.yourexcitingapplication.com"
  34.     }
  35. }
  36. // log4j configuration
  37. log4j {
  38.     appender.stdout = "org.apache.log4j.ConsoleAppender"
  39.     appender.'stdout.layout'="org.apache.log4j.PatternLayout"
  40.     appender.'stdout.layout.ConversionPattern'='[%r] %c{2} %m%n'
  41.     appender.errors = "org.apache.log4j.FileAppender"
  42.     appender.'errors.layout'="org.apache.log4j.PatternLayout"
  43.     appender.'errors.layout.ConversionPattern'='[%r] %c{2} %m%n'
  44.     appender.'errors.File'="stacktrace.log"
  45.     rootLogger="error,stdout"
  46.     logger {
  47.         grails="error"
  48.         StackTrace="error,errors"
  49.         org {
  50.             codehaus.groovy.grails.web.servlet="error"  //  controllers
  51.             codehaus.groovy.grails.web.pages="error" //  GSP
  52.             codehaus.groovy.grails.web.sitemesh="error" //  layouts
  53.             codehaus.groovy.grails."web.mapping.filter"="error" // URL mapping
  54.             codehaus.groovy.grails."web.mapping"="error" // URL mapping
  55.             codehaus.groovy.grails.commons="info" // core / classloading
  56.             codehaus.groovy.grails.plugins="error" // plugins
  57.             codehaus.groovy.grails.orm.hibernate="error" // hibernate integration
  58.             springframework="off"
  59.             hibernate="off"
  60.         }
  61.     }
  62.     additivity.StackTrace=false
  63. }
  64. log4j.logger.org.acegisecurity="off,stdout"