Skip to content

Commit b127a8a

Browse files
author
Vitalii Samolovskikh
committed
Create the new grails application.
1 parent 1a58961 commit b127a8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+5550
-0
lines changed

application.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Grails Metadata file
2+
#Wed Jun 18 20:02:33 YEKT 2014
3+
app.grails.version=2.3.9
4+
app.name=grails-asynchronous-mail-sample
5+
app.version=0.1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
modules = {
2+
application {
3+
resource url:'js/application.js'
4+
}
5+
}

grails-app/conf/BootStrap.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class BootStrap {
2+
3+
def init = { servletContext ->
4+
}
5+
def destroy = {
6+
}
7+
}

grails-app/conf/BuildConfig.groovy

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
2+
grails.project.class.dir = "target/classes"
3+
grails.project.test.class.dir = "target/test-classes"
4+
grails.project.test.reports.dir = "target/test-reports"
5+
grails.project.work.dir = "target/work"
6+
grails.project.target.level = 1.6
7+
grails.project.source.level = 1.6
8+
//grails.project.war.file = "target/${appName}-${appVersion}.war"
9+
10+
grails.project.fork = [
11+
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
12+
// compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
13+
14+
// configure settings for the test-app JVM, uses the daemon by default
15+
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
16+
// configure settings for the run-app JVM
17+
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
18+
// configure settings for the run-war JVM
19+
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
20+
// configure settings for the Console UI JVM
21+
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
22+
]
23+
24+
grails.project.dependency.resolver = "maven" // or ivy
25+
grails.project.dependency.resolution = {
26+
// inherit Grails' default dependencies
27+
inherits("global") {
28+
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
29+
// excludes 'ehcache'
30+
}
31+
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
32+
checksums true // Whether to verify checksums on resolve
33+
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
34+
35+
repositories {
36+
inherits true // Whether to inherit repository definitions from plugins
37+
38+
grailsPlugins()
39+
grailsHome()
40+
mavenLocal()
41+
grailsCentral()
42+
mavenCentral()
43+
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
44+
//mavenRepo "http://repository.codehaus.org"
45+
//mavenRepo "http://download.java.net/maven/2/"
46+
//mavenRepo "http://repository.jboss.com/maven2/"
47+
}
48+
49+
dependencies {
50+
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
51+
// runtime 'mysql:mysql-connector-java:5.1.27'
52+
// runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
53+
}
54+
55+
plugins {
56+
// plugins for the build system only
57+
build ":tomcat:7.0.53"
58+
59+
// plugins for the compile step
60+
compile ":scaffolding:2.0.3"
61+
compile ':cache:1.1.2'
62+
63+
// plugins needed at runtime but not for compilation
64+
runtime ":hibernate:3.6.10.15" // or ":hibernate4:4.3.5.2"
65+
runtime ":database-migration:1.4.0"
66+
runtime ":jquery:1.11.1"
67+
runtime ":resources:1.2.7"
68+
// Uncomment these (or add new ones) to enable additional resources capabilities
69+
//runtime ":zipped-resources:1.0.1"
70+
//runtime ":cached-resources:1.1"
71+
//runtime ":yui-minify-resources:0.1.5"
72+
73+
// An alternative to the default resources plugin is the asset-pipeline plugin
74+
//compile ":asset-pipeline:1.6.1"
75+
76+
// Uncomment these to enable additional asset-pipeline capabilities
77+
//compile ":sass-asset-pipeline:1.5.5"
78+
//compile ":less-asset-pipeline:1.5.3"
79+
//compile ":coffee-asset-pipeline:1.5.0"
80+
//compile ":handlebars-asset-pipeline:1.3.0.1"
81+
}
82+
}

grails-app/conf/Config.groovy

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

grails-app/conf/DataSource.groovy

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
dataSource {
2+
pooled = true
3+
jmxExport = true
4+
driverClassName = "org.h2.Driver"
5+
username = "sa"
6+
password = ""
7+
}
8+
hibernate {
9+
cache.use_second_level_cache = true
10+
cache.use_query_cache = false
11+
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
12+
// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
13+
singleSession = true // configure OSIV singleSession mode
14+
}
15+
16+
// environment specific settings
17+
environments {
18+
development {
19+
dataSource {
20+
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
21+
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
22+
}
23+
}
24+
test {
25+
dataSource {
26+
dbCreate = "update"
27+
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
28+
}
29+
}
30+
production {
31+
dataSource {
32+
dbCreate = "update"
33+
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
34+
properties {
35+
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
36+
jmxEnabled = true
37+
initialSize = 5
38+
maxActive = 50
39+
minIdle = 5
40+
maxIdle = 25
41+
maxWait = 10000
42+
maxAge = 10 * 60000
43+
timeBetweenEvictionRunsMillis = 5000
44+
minEvictableIdleTimeMillis = 60000
45+
validationQuery = "SELECT 1"
46+
validationQueryTimeout = 3
47+
validationInterval = 15000
48+
testOnBorrow = true
49+
testWhileIdle = true
50+
testOnReturn = false
51+
jdbcInterceptors = "ConnectionState"
52+
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
53+
}
54+
}
55+
}
56+
}

grails-app/conf/UrlMappings.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class UrlMappings {
2+
3+
static mappings = {
4+
"/$controller/$action?/$id?(.$format)?"{
5+
constraints {
6+
// apply constraints here
7+
}
8+
}
9+
10+
"/"(view:"/index")
11+
"500"(view:'/error')
12+
}
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place your Spring DSL code here
2+
beans = {
3+
}

grails-app/i18n/messages.properties

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}]
2+
default.invalid.url.message=Property [{0}] of class [{1}] with value [{2}] is not a valid URL
3+
default.invalid.creditCard.message=Property [{0}] of class [{1}] with value [{2}] is not a valid credit card number
4+
default.invalid.email.message=Property [{0}] of class [{1}] with value [{2}] is not a valid e-mail address
5+
default.invalid.range.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid range from [{3}] to [{4}]
6+
default.invalid.size.message=Property [{0}] of class [{1}] with value [{2}] does not fall within the valid size range from [{3}] to [{4}]
7+
default.invalid.max.message=Property [{0}] of class [{1}] with value [{2}] exceeds maximum value [{3}]
8+
default.invalid.min.message=Property [{0}] of class [{1}] with value [{2}] is less than minimum value [{3}]
9+
default.invalid.max.size.message=Property [{0}] of class [{1}] with value [{2}] exceeds the maximum size of [{3}]
10+
default.invalid.min.size.message=Property [{0}] of class [{1}] with value [{2}] is less than the minimum size of [{3}]
11+
default.invalid.validator.message=Property [{0}] of class [{1}] with value [{2}] does not pass custom validation
12+
default.not.inlist.message=Property [{0}] of class [{1}] with value [{2}] is not contained within the list [{3}]
13+
default.blank.message=Property [{0}] of class [{1}] cannot be blank
14+
default.not.equal.message=Property [{0}] of class [{1}] with value [{2}] cannot equal [{3}]
15+
default.null.message=Property [{0}] of class [{1}] cannot be null
16+
default.not.unique.message=Property [{0}] of class [{1}] with value [{2}] must be unique
17+
18+
default.paginate.prev=Previous
19+
default.paginate.next=Next
20+
default.boolean.true=True
21+
default.boolean.false=False
22+
default.date.format=yyyy-MM-dd HH:mm:ss z
23+
default.number.format=0
24+
25+
default.created.message={0} {1} created
26+
default.updated.message={0} {1} updated
27+
default.deleted.message={0} {1} deleted
28+
default.not.deleted.message={0} {1} could not be deleted
29+
default.not.found.message={0} not found with id {1}
30+
default.optimistic.locking.failure=Another user has updated this {0} while you were editing
31+
32+
default.home.label=Home
33+
default.list.label={0} List
34+
default.add.label=Add {0}
35+
default.new.label=New {0}
36+
default.create.label=Create {0}
37+
default.show.label=Show {0}
38+
default.edit.label=Edit {0}
39+
40+
default.button.create.label=Create
41+
default.button.edit.label=Edit
42+
default.button.update.label=Update
43+
default.button.delete.label=Delete
44+
default.button.delete.confirm.message=Are you sure?
45+
46+
# Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author)
47+
typeMismatch.java.net.URL=Property {0} must be a valid URL
48+
typeMismatch.java.net.URI=Property {0} must be a valid URI
49+
typeMismatch.java.util.Date=Property {0} must be a valid Date
50+
typeMismatch.java.lang.Double=Property {0} must be a valid number
51+
typeMismatch.java.lang.Integer=Property {0} must be a valid number
52+
typeMismatch.java.lang.Long=Property {0} must be a valid number
53+
typeMismatch.java.lang.Short=Property {0} must be a valid number
54+
typeMismatch.java.math.BigDecimal=Property {0} must be a valid number
55+
typeMismatch.java.math.BigInteger=Property {0} must be a valid number

0 commit comments

Comments
 (0)