This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 182
/
Config.groovy
executable file
·149 lines (128 loc) · 5.63 KB
/
Config.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import grails.plugin.cloudfoundry.AppCloudEnvironment
import org.springframework.amqp.rabbit.log4j.AmqpAppender
// locations to search for config files that get merged into the main config
// config files can either be Java properties files or ConfigSlurper scripts
// grails.config.locations = [ "classpath:${appName}-config.properties",
// "classpath:${appName}-config.groovy",
// "file:${userHome}/.grails/${appName}-config.properties",
// "file:${userHome}/.grails/${appName}-config.groovy"]
// if(System.properties["${appName}.config.location"]) {
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
// }
grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
grails.mime.use.accept.header = false
grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
xml: ['text/xml', 'application/xml'],
text: 'text/plain',
js: 'text/javascript',
rss: 'application/rss+xml',
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
all: '*/*',
json: ['application/json','text/json'],
form: 'application/x-www-form-urlencoded',
multipartForm: 'multipart/form-data'
]
// URL Mapping Cache Max Size, defaults to 5000
//grails.urlmapping.cache.maxsize = 1000
// The default codec used to encode data with ${}
grails.views.default.codec = "none" // none, html, base64
grails.views.gsp.encoding = "UTF-8"
grails.converters.encoding = "UTF-8"
// enable Sitemesh preprocessing of GSP pages
grails.views.gsp.sitemesh.preprocess = true
// scaffolding templates configuration
grails.scaffolding.templates.domainSuffix = 'Instance'
// Set to false to use the new Grails 1.2 JSONBuilder in the render method
grails.json.legacy.builder = false
// enabled native2ascii conversion of i18n properties files
grails.enable.native2ascii = true
// whether to install the java.util.logging bridge for sl4j. Disable for AppEngine!
grails.logging.jul.usebridge = true
// packages to include in Spring bean scanning
grails.spring.bean.packages = []
searchable {
compassConnection = null
compassSettings = [
'compass.engine.analyzer.default.type': "Snowball",
'compass.engine.analyzer.default.name': "English"]
defaultExcludedProperties = ["password"]
defaultFormats = [:]
defaultMethodOptions = [
search: [reload: false, escape: false, offset: 0, max: 10, defaultOperator: "and"],
suggestQuery: [userFriendly: true]
]
mirrorChanges = false
bulkIndexOnStartup = false
}
rabbitmq {
connectionfactory {
username = 'guest'
password = 'guest'
hostname = 'localhost'
}
queues = {
exchange name: 'search.sync', type: fanout, durable: false
}
}
// log4j configuration
log4j = {
// AMQP appender needs RabbitMQ connection settings. Pull from
// VCAP_SERVICES.
def rabbitConfig
def cloudEnv = new AppCloudEnvironment()
if (cloudEnv.available) {
def serviceInfo = new AppCloudEnvironment().getServiceByVendor('rabbitmq')
if (serviceInfo) {
}
rabbitConfig = [
host: serviceInfo.host,
username: serviceInfo.userName,
password: serviceInfo.password,
virtualHost: serviceInfo.virtualHost,
port: serviceInfo.port]
}
else {
def connFactory = owner.rabbitmq.connectionfactory
rabbitConfig = [
host: connFactory.hostname,
username: connFactory.username,
password: connFactory.password,
virtualHost: connFactory.virtualHost]
}
appenders {
rabbitConfig << [
name: "rabbit",
exchangeName: "amq.topic",
exchangeType: "topic",
routingKeyPattern: "logs.grailstwitter",
contentEncoding: "UTF-8",
applicationId: "grailstwitter" ]
appender new AmqpAppender(rabbitConfig)
console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
}
root {
info 'stdout', 'rabbit'
}
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
warn 'org.mortbay.log'
info 'grails.app'
debug 'grails.app.controllers.org.grails.twitter',
'grails.app.services.org.grails.twitter'
}
// Added by the Spring Security Core plugin:
grails.plugins.springsecurity.userLookup.userDomainClassName = 'org.grails.twitter.auth.Person'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'org.grails.twitter.auth.PersonAuthority'
grails.plugins.springsecurity.authority.className = 'org.grails.twitter.auth.Authority'