├── .gitignore ├── ERRATA.md ├── LICENSE ├── README.md ├── Test.groovy ├── actors.groovy ├── books.txt ├── build.gradle ├── chemistry.groovy ├── closures.groovy ├── collections.groovy ├── conditionals.groovy ├── curry.groovy ├── example ├── .gitignore ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── grails-app │ ├── assets │ │ ├── images │ │ │ ├── apple-touch-icon-retina.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── favicon.ico │ │ │ ├── grails-cupsonly-logo-white.svg │ │ │ ├── grails.svg │ │ │ ├── skin │ │ │ │ ├── database_add.png │ │ │ │ ├── database_delete.png │ │ │ │ ├── database_edit.png │ │ │ │ ├── database_save.png │ │ │ │ ├── database_table.png │ │ │ │ ├── exclamation.png │ │ │ │ ├── house.png │ │ │ │ ├── information.png │ │ │ │ ├── shadow.jpg │ │ │ │ ├── sorted_asc.gif │ │ │ │ └── sorted_desc.gif │ │ │ └── spinner.gif │ │ ├── javascripts │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ └── jquery-2.2.0.min.js │ │ └── stylesheets │ │ │ ├── application.css │ │ │ ├── bootstrap.css │ │ │ ├── errors.css │ │ │ ├── grails.css │ │ │ ├── main.css │ │ │ └── mobile.css │ ├── conf │ │ ├── application.yml │ │ ├── logback.groovy │ │ └── spring │ │ │ └── resources.groovy │ ├── controllers │ │ └── example │ │ │ ├── PostController.groovy │ │ │ └── UrlMappings.groovy │ ├── domain │ │ └── example │ │ │ ├── Comment.groovy │ │ │ ├── Post.groovy │ │ │ └── User.groovy │ ├── i18n │ │ ├── messages.properties │ │ ├── messages_cs.properties │ │ ├── messages_da.properties │ │ ├── messages_de.properties │ │ ├── messages_es.properties │ │ ├── messages_fr.properties │ │ ├── messages_it.properties │ │ ├── messages_ja.properties │ │ ├── messages_nb.properties │ │ ├── messages_nl.properties │ │ ├── messages_pl.properties │ │ ├── messages_pt_BR.properties │ │ ├── messages_pt_PT.properties │ │ ├── messages_ru.properties │ │ ├── messages_sk.properties │ │ ├── messages_sv.properties │ │ ├── messages_th.properties │ │ └── messages_zh_CN.properties │ ├── init │ │ └── example │ │ │ ├── Application.groovy │ │ │ └── BootStrap.groovy │ ├── services │ │ └── example │ │ │ └── PostService.groovy │ ├── taglib │ │ └── SimpleTagLib.groovy │ └── views │ │ ├── error.gsp │ │ ├── index.gsp │ │ ├── layouts │ │ └── main.gsp │ │ ├── notFound.gsp │ │ └── post │ │ ├── create.gsp │ │ ├── edit.gsp │ │ ├── index.gsp │ │ └── show.gsp ├── grails-wrapper.jar ├── grailsw ├── grailsw.bat └── src │ ├── integration-test │ ├── groovy │ │ └── example │ │ │ └── PostServiceSpec.groovy │ └── resources │ │ └── GebConfig.groovy │ └── test │ └── groovy │ └── example │ ├── CommentSpec.groovy │ ├── PostControllerSpec.groovy │ ├── PostSpec.groovy │ └── UserSpec.groovy ├── g3.groovy ├── g3_arm.groovy ├── g3_lambdas.groovy ├── g3_new_operators.groovy ├── g3_var.groovy ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── groovydoc.groovy ├── gstrings.groovy ├── io.groovy ├── json.groovy ├── loops.groovy ├── math.groovy ├── methodmissing.groovy ├── methods.groovy ├── ratpack-example ├── README.md ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── ratpack │ ├── Ratpack.groovy │ ├── public │ └── images │ │ └── favicon.ico │ └── templates │ └── index.gtpl ├── regex.groovy ├── settings.gradle ├── smaug.groovy ├── sms.groovy ├── subproject1 └── build.gradle ├── subproject2 ├── build.gradle └── groocss │ └── index.css.groovy ├── swing.groovy ├── switch.groovy ├── timecategory.groovy └── with_propertyMissing.groovy /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build/ 3 | *~ 4 | *.zip 5 | # Ignore Gradle GUI config 6 | gradle-app.setting 7 | # Ignore IDE settings 8 | .settings 9 | .eclipse 10 | .idea 11 | *.iws 12 | *.ipr 13 | *.iml 14 | # ignore groocss output 15 | ratpack-example/src/ratpack/public/styles/ 16 | 17 | -------------------------------------------------------------------------------- /ERRATA.md: -------------------------------------------------------------------------------- 1 | 2 | # GPars 3 | 4 | Although GPars was bundled into Groovy after 2.1, they apparently removed it in later versions so you will still need to add a dependency. 5 | 6 | For example, using the built-in _Grape_ system, you can simply add the following to the top of a Groovy script: 7 | 8 | @Grab(group='org.codehaus.gpars', module='gpars', version='1.2.1') 9 | 10 | Or, using Gradle: 11 | 12 | dependencies { 13 | compile "org.codehaus.gpars:gpars:1.2.1" 14 | } 15 | 16 | See [GPars website](http://www.gpars.org/webapp/Integration.html) for more information. 17 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Learning Groovy 3 | 4 | Git repo for the book "Learning Groovy" available on [Apress](http://www.apress.com/9781484221167). 5 | 6 | Contains most of the code examples used in the book. 7 | 8 | ## Grails 3 9 | 10 | The Grails 3.3.10 application is located in the "example" directory. 11 | 12 | ## Groovy DSL 13 | 14 | See [Groovy Chemistry](https://github.com/adamldavis/groovy-chemistry) for an example of a Groovy DSL. 15 | 16 | For a more advanced DSL see [GrooCSS](https://github.com/adamldavis/groocss). 17 | 18 | ## Ratpack 19 | 20 | Contains a simple ratpack 1.4 application created by [lazybones](https://github.com/pledbrook/lazybones). 21 | 22 | 23 | ## Acknowledgments 24 | 25 | The creator of Spock is [Peter Niederwieser](https://github.com/pniederw). 26 | 27 | The lead of Ratpack is [Luke Daley](https://github.com/alkemist). 28 | 29 | The main contributor to Gradle is [Adam Murdoch](https://github.com/adammurdoch). 30 | 31 | The main contributor to Grails is [Graeme Rocher](https://github.com/graemerocher). 32 | 33 | ## Errata 34 | 35 | See ERRATA.md for book corrections/errors. 36 | 37 | 38 | -------------------------------------------------------------------------------- /Test.groovy: -------------------------------------------------------------------------------- 1 | /** Non-runtime comment. This class demonstrates the Groovy 3 ability to include groovydocs at runtime without any annotations. */ 2 | /**@Test */ 3 | class Test { 4 | // note that normal comments can still be here 5 | /**@My metadata */ 6 | def method() {} 7 | } 8 | 9 | -------------------------------------------------------------------------------- /actors.groovy: -------------------------------------------------------------------------------- 1 | @Grab("org.codehaus.gpars:gpars:1.2.1") 2 | 3 | import groovyx.gpars.actor.Actor 4 | import groovyx.gpars.actor.DefaultActor 5 | 6 | class Dragon extends DefaultActor { 7 | int age 8 | 9 | void afterStart() { 10 | age = new Random().nextInt(1000) + 1 11 | } 12 | 13 | void act() { 14 | loop { 15 | react { int num -> 16 | if (num > age) 17 | reply 'too old' 18 | else if (num < age) 19 | reply 'too young' 20 | else { 21 | reply 'you win' 22 | terminate() 23 | } 24 | } 25 | } 26 | } 27 | } 28 | 29 | class Guesser extends DefaultActor { 30 | String name 31 | Actor server 32 | int myNum 33 | 34 | void act() { 35 | loop { 36 | myNum = new Random().nextInt(1000) + 1 37 | server.send myNum 38 | react { 39 | switch (it) { 40 | case 'too old': println "$name: $myNum was too old"; break 41 | case 'too young': println "$name: $myNum was too young"; break 42 | case 'you win': println "$name: I won $myNum"; terminate(); break 43 | } 44 | } 45 | } 46 | } 47 | } 48 | 49 | def master = new Dragon().start() 50 | def player = new Guesser(name: 'Guesser', server: master).start() 51 | 52 | //this forces main thread to live until both actors stop 53 | [master, player]*.join() 54 | 55 | -------------------------------------------------------------------------------- /books.txt: -------------------------------------------------------------------------------- 1 | Modern Java -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Tested using Gradle 4.8.1 2 | // see settings.gradle for how to include subprojects 3 | // run on the command line like this: 4 | // ./gradlew tasks --list all tasks 5 | // ./gradlew printName --prints names of subprojects 6 | // ./gradlew styles --puts css in ratpack-example/src/ratpack/public/styles 7 | // ./gradlew run --runs the Ratpack app 8 | apply plugin: 'java' 9 | apply plugin: 'groovy' 10 | 11 | sourceCompatibility = '1.8' 12 | 13 | repositories { 14 | mavenLocal() 15 | mavenCentral() 16 | jcenter() 17 | } 18 | 19 | dependencies { 20 | compile 'com.google.guava:guava:19.0' 21 | compile 'org.bitbucket.dollar:dollar:1.0-beta3' 22 | // Updated to latest version of groovy: 23 | compile 'org.codehaus.groovy:groovy:3.0.0-alpha-4' 24 | testCompile group: 'junit', name: 'junit', version: '4.+' 25 | testCompile "org.mockito:mockito-core:1.9.5" 26 | 27 | compile project(':subproject1') 28 | compile project(':subproject2') 29 | } 30 | 31 | // ext block defines any properties you want to use. it's useful for defining versions 32 | ext { 33 | myVersion = '1.4.5' 34 | outputDir = file('lib/x86') 35 | } 36 | 37 | task wrapper(type: Wrapper) { 38 | gradleVersion = '4.8.1' 39 | } 40 | 41 | // << is an alias for doLast. it takes a closure which gets run when the task runs. 42 | task upper << { 43 | String someString = "test" 44 | println "Original: $someString" 45 | println "Uppercase: " + someString.toUpperCase() 46 | } 47 | 48 | allprojects { 49 | apply plugin: 'groovy' 50 | } 51 | // overrides the default groovy dir (src/main/groovy) and excludes some files 52 | sourceSets { 53 | main { 54 | groovy { 55 | srcDirs = ['./'] 56 | excludes = ['ratpack-example', 'ratpack-example2', 'smaug.groovy', 'actors.groovy'] 57 | } 58 | } 59 | } 60 | 61 | // this runs during the first pass every time 62 | task exploring { 63 | println sourceSets.main.properties 64 | } 65 | // prints the value of myVersion 66 | task version << { 67 | println myVersion 68 | } 69 | 70 | -------------------------------------------------------------------------------- /chemistry.groovy: -------------------------------------------------------------------------------- 1 | 2 | // Represents a chemical Element 3 | class Element { 4 | String symbol 5 | Element(s) { symbol = s } 6 | double getWeight() {symbol=='H' ? 1.00794 : 15.9994} 7 | String toString() { symbol } 8 | } 9 | // Represents a chemical Compound 10 | class Compound { 11 | final Map elements = [:] 12 | 13 | Compound(String str) { 14 | def matcher = str =~ /([A-Z][a-z]*)([0-9]+)?/ 15 | while (matcher.find()) add( 16 | new Element(matcher.group(1)), 17 | (matcher.group(2) ?: 1) as Integer) 18 | } 19 | void add(Element e, int num) { 20 | if (elements[e]) elements[e] += num 21 | else elements[e] = num 22 | } 23 | double getWeight() { 24 | elements.keySet().inject(0d) { sum, key -> 25 | sum + (key.weight * elements[key]) 26 | } 27 | } 28 | String toString() { "$elements" } 29 | } 30 | def propertyMissing(String name) { 31 | def comp = new Compound(name) 32 | (comp.elements.size() == 1 && comp.elements.values()[0]==1) ? 33 | comp.elements.keySet()[0] : comp 34 | } 35 | def water = H2O 36 | println water 37 | println water.weight 38 | 39 | -------------------------------------------------------------------------------- /closures.groovy: -------------------------------------------------------------------------------- 1 | 2 | def closr = {x -> x + 1} 3 | 4 | println( closr(2) ) 5 | 6 | //def closr = {it + 1} 7 | 8 | def list = ['foo','bar'] 9 | def newList = [] 10 | list.collect( newList ) { 11 | it.toUpperCase() 12 | } 13 | println newList // ["FOO", "BAR"] 14 | 15 | 16 | 17 | def find(list, tester) { 18 | for (item in list) 19 | if (tester(item)) return item 20 | } 21 | 22 | find([1,2]) { it > 1 } 23 | 24 | -------------------------------------------------------------------------------- /collections.groovy: -------------------------------------------------------------------------------- 1 | import groovy.transform.* 2 | @Canonical 3 | class Vampire {String name; int yearBorn; } 4 | ARRAYS: { 5 | Vampire[] vampires = new Vampire[10]; // Vampire array with length 10 6 | String[] names = ["Dracula", "Edward"]; 7 | println(vampires) 8 | println(names) 9 | } 10 | LISTS: { 11 | // java way 12 | List vampires = new ArrayList<>(); 13 | vampires.add(new Vampire("Count Dracula", 1897)); 14 | println(vampires) 15 | 16 | //groovy way 17 | def list = [] 18 | list.add(new Vampire("Count Dracula", 1897)) 19 | // or 20 | list << new Vampire("Count Dracula", 1897) 21 | // or 22 | list += new Vampire("Count Dracula", 1897) 23 | } 24 | SET1: { 25 | Set dragons = new HashSet<>(); 26 | dragons.add("Lambton"); 27 | dragons.add("Deerhurst"); 28 | println dragons.size(); // 2 29 | dragons.remove("Lambton"); 30 | println dragons.size(); // 1 31 | println(dragons) 32 | } 33 | SET2: { 34 | SortedSet dragons = new TreeSet<>(); 35 | dragons.add("Lambton"); 36 | dragons.add("Smaug"); 37 | dragons.add("Deerhurst"); 38 | dragons.add("Norbert"); 39 | System.out.println(dragons); 40 | } 41 | MAPS: { 42 | // [Deerhurst, Lambton, Norbert, Smaug] 43 | Map map = new HashMap<>(); 44 | map.put("Smaug", "deadly"); 45 | map.put("Norbert", "cute"); 46 | map.size(); // 2 47 | map.get("Smaug"); // deadly 48 | } 49 | -------------------------------------------------------------------------------- /conditionals.groovy: -------------------------------------------------------------------------------- 1 | 2 | //groovy truth 3 | 4 | if ("foo") println("true") 5 | if (!"") println("true") 6 | if (42) println("true") 7 | if (! 0) println("true") 8 | 9 | -------------------------------------------------------------------------------- /curry.groovy: -------------------------------------------------------------------------------- 1 | 2 | def concat = { x, y -> return x + y } 3 | // closure 4 | def burn = concat.curry("burn") 5 | def inate = concat.curry("inate") 6 | 7 | burn(" wood") // == burn wood 8 | 9 | def composition = { f, g, x -> return f(g(x)) } 10 | def burninate = composition.curry(burn, inate) 11 | def trogdor = burninate(' all the people') 12 | println "Trogdor: ${trogdor}" 13 | // Trogdor: burninate all the people 14 | 15 | 16 | def breathFire(name) { println "Burninating $name!" } 17 | 18 | ['the country side', 'all the people'].each(this.&breathFire) 19 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | .DS_Store 3 | .gradle 4 | build/ 5 | out/ 6 | .idea 7 | *.iml 8 | *.ipr 9 | *.iws 10 | .project 11 | .settings 12 | .classpath 13 | -------------------------------------------------------------------------------- /example/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenLocal() 4 | maven { url "https://repo.grails.org/grails/core" } 5 | } 6 | dependencies { 7 | classpath "org.grails:grails-gradle-plugin:$grailsVersion" 8 | classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}" 9 | classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.8" 10 | } 11 | } 12 | 13 | version "0.1" 14 | group "example" 15 | 16 | apply plugin:"eclipse" 17 | apply plugin:"idea" 18 | apply plugin:"war" 19 | apply plugin:"org.grails.grails-web" 20 | apply plugin:"asset-pipeline" 21 | apply plugin:"org.grails.grails-gsp" 22 | 23 | repositories { 24 | mavenLocal() 25 | maven { url "https://repo.grails.org/grails/core" } 26 | } 27 | 28 | dependencies { 29 | compile "org.springframework.boot:spring-boot-starter-logging" 30 | compile "org.springframework.boot:spring-boot-autoconfigure" 31 | compile "org.grails:grails-core" 32 | compile "org.springframework.boot:spring-boot-starter-actuator" 33 | compile "org.springframework.boot:spring-boot-starter-tomcat" 34 | compile "org.grails:grails-web-boot" 35 | compile "org.grails:grails-logging" 36 | compile "org.grails:grails-plugin-rest" 37 | compile "org.grails:grails-plugin-databinding" 38 | compile "org.grails:grails-plugin-i18n" 39 | compile "org.grails:grails-plugin-services" 40 | compile "org.grails:grails-plugin-url-mappings" 41 | compile "org.grails:grails-plugin-interceptors" 42 | compile "org.grails.plugins:cache" 43 | compile "org.grails.plugins:async" 44 | compile "org.grails.plugins:scaffolding" 45 | compile "org.grails.plugins:events" 46 | compile "org.grails.plugins:hibernate5" 47 | compile "org.hibernate:hibernate-core:5.1.5.Final" 48 | compile "org.grails.plugins:gsp" 49 | console "org.grails:grails-console" 50 | profile "org.grails.profiles:web" 51 | runtime "org.glassfish.web:el-impl:2.1.2-b03" 52 | runtime "com.h2database:h2" 53 | runtime "org.apache.tomcat:tomcat-jdbc" 54 | runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.8" 55 | testCompile "org.grails:grails-gorm-testing-support" 56 | testCompile "org.grails:grails-web-testing-support" 57 | testCompile "org.grails.plugins:geb:1.1.2" 58 | testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:2.47.1" 59 | testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1" 60 | testRuntime "net.sourceforge.htmlunit:htmlunit:2.18" 61 | } 62 | 63 | bootRun { 64 | jvmArgs('-Dspring.output.ansi.enabled=always') 65 | addResources = true 66 | String springProfilesActive = 'spring.profiles.active' 67 | systemProperty springProfilesActive, System.getProperty(springProfilesActive) 68 | } 69 | 70 | tasks.withType(Test) { 71 | systemProperty "geb.env", System.getProperty('geb.env') 72 | systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest") 73 | systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver') 74 | systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver') 75 | } 76 | 77 | assets { 78 | minifyJs = true 79 | minifyCss = true 80 | } 81 | -------------------------------------------------------------------------------- /example/gradle.properties: -------------------------------------------------------------------------------- 1 | grailsVersion=3.3.10 2 | gormVersion=6.1.10.RELEASE 3 | gradleWrapperVersion=3.5 4 | -------------------------------------------------------------------------------- /example/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Nov 27 23:09:32 CET 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip 7 | -------------------------------------------------------------------------------- /example/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /example/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/grails-app/assets/images/apple-touch-icon-retina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/apple-touch-icon-retina.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/apple-touch-icon.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/favicon.ico -------------------------------------------------------------------------------- /example/grails-app/assets/images/grails-cupsonly-logo-white.svg: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /example/grails-app/assets/images/grails.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | grails 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/database_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/database_add.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/database_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/database_delete.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/database_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/database_edit.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/database_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/database_save.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/database_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/database_table.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/exclamation.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/house.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/house.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/information.png -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/shadow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/shadow.jpg -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/sorted_asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/sorted_asc.gif -------------------------------------------------------------------------------- /example/grails-app/assets/images/skin/sorted_desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/skin/sorted_desc.gif -------------------------------------------------------------------------------- /example/grails-app/assets/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamldavis/learning-groovy/7fccb59d129e97f3d1c7c2df4477738883fb0e8c/example/grails-app/assets/images/spinner.gif -------------------------------------------------------------------------------- /example/grails-app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js. 2 | // 3 | // Any JavaScript file within this directory can be referenced here using a relative path. 4 | // 5 | // You're free to add application-wide JavaScript to this file, but it's generally better 6 | // to create separate JavaScript files as needed. 7 | // 8 | //= require jquery-2.2.0.min 9 | //= require bootstrap 10 | //= require_tree . 11 | //= require_self 12 | 13 | if (typeof jQuery !== 'undefined') { 14 | (function($) { 15 | $(document).ajaxStart(function() { 16 | $('#spinner').fadeIn(); 17 | }).ajaxStop(function() { 18 | $('#spinner').fadeOut(); 19 | }); 20 | })(jQuery); 21 | } 22 | -------------------------------------------------------------------------------- /example/grails-app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS file within this directory can be referenced here using a relative path. 6 | * 7 | * You're free to add application-wide styles to this file and they'll appear at the top of the 8 | * compiled file, but it's generally better to create a new file per style scope. 9 | * 10 | *= require bootstrap 11 | *= require grails 12 | *= require main 13 | *= require mobile 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /example/grails-app/assets/stylesheets/errors.css: -------------------------------------------------------------------------------- 1 | h1, h2 { 2 | margin: 10px 25px 5px; 3 | } 4 | 5 | h2 { 6 | font-size: 1.1em; 7 | } 8 | 9 | .filename { 10 | font-style: italic; 11 | } 12 | 13 | .exceptionMessage { 14 | margin: 10px; 15 | border: 1px solid #000; 16 | padding: 5px; 17 | background-color: #E9E9E9; 18 | } 19 | 20 | .stack, 21 | .snippet { 22 | margin: 0 25px 10px; 23 | } 24 | 25 | .stack, 26 | .snippet { 27 | border: 1px solid #ccc; 28 | -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); 29 | -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); 30 | box-shadow: 0 0 2px rgba(0,0,0,0.2); 31 | } 32 | 33 | /* error details */ 34 | .error-details { 35 | border-top: 1px solid #FFAAAA; 36 | -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); 37 | -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); 38 | box-shadow: 0 0 2px rgba(0,0,0,0.2); 39 | border-bottom: 1px solid #FFAAAA; 40 | -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); 41 | -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); 42 | box-shadow: 0 0 2px rgba(0,0,0,0.2); 43 | background-color:#FFF3F3; 44 | line-height: 1.5; 45 | overflow: hidden; 46 | padding: 5px; 47 | padding-left:25px; 48 | } 49 | 50 | .error-details dt { 51 | clear: left; 52 | float: left; 53 | font-weight: bold; 54 | margin-right: 5px; 55 | } 56 | 57 | .error-details dt:after { 58 | content: ":"; 59 | } 60 | 61 | .error-details dd { 62 | display: block; 63 | } 64 | 65 | /* stack trace */ 66 | .stack { 67 | padding: 5px; 68 | overflow: auto; 69 | height: 150px; 70 | } 71 | 72 | /* code snippet */ 73 | .snippet { 74 | background-color: #fff; 75 | font-family: monospace; 76 | } 77 | 78 | .snippet .line { 79 | display: block; 80 | } 81 | 82 | .snippet .lineNumber { 83 | background-color: #ddd; 84 | color: #999; 85 | display: inline-block; 86 | margin-right: 5px; 87 | padding: 0 3px; 88 | text-align: right; 89 | width: 3em; 90 | } 91 | 92 | .snippet .error { 93 | background-color: #fff3f3; 94 | font-weight: bold; 95 | } 96 | 97 | .snippet .error .lineNumber { 98 | background-color: #faa; 99 | color: #333; 100 | font-weight: bold; 101 | } 102 | 103 | .snippet .line:first-child .lineNumber { 104 | padding-top: 5px; 105 | } 106 | 107 | .snippet .line:last-child .lineNumber { 108 | padding-bottom: 5px; 109 | } -------------------------------------------------------------------------------- /example/grails-app/assets/stylesheets/main.css: -------------------------------------------------------------------------------- 1 | /* FONT STACK */ 2 | body, 3 | input, select, textarea { 4 | font-family: "Open Sans", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 5 | } 6 | 7 | h1, h2, h3, h4, h5, h6 { 8 | line-height: 1.1; 9 | } 10 | 11 | /* BASE LAYOUT */ 12 | 13 | html { 14 | background-color: #ddd; 15 | background-image: -moz-linear-gradient(center top, #aaa, #ddd); 16 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #aaa), color-stop(1, #ddd)); 17 | background-image: linear-gradient(top, #aaa, #ddd); 18 | filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#aaaaaa', EndColorStr = '#dddddd'); 19 | background-repeat: no-repeat; 20 | height: 100%; 21 | /* change the box model to exclude the padding from the calculation of 100% height (IE8+) */ 22 | -webkit-box-sizing: border-box; 23 | -moz-box-sizing: border-box; 24 | box-sizing: border-box; 25 | } 26 | 27 | html.no-cssgradients { 28 | background-color: #aaa; 29 | } 30 | 31 | html * { 32 | margin: 0; 33 | } 34 | 35 | body { 36 | background-color: #F5F5F5; 37 | color: #333333; 38 | overflow-x: hidden; /* prevents box-shadow causing a horizontal scrollbar in firefox when viewport < 960px wide */ 39 | -moz-box-shadow: 0 0 0.3em #424649; 40 | -webkit-box-shadow: 0 0 0.3em #424649; 41 | box-shadow: 0 0 0.3em #424649; 42 | } 43 | 44 | #grailsLogo { 45 | background-color: #feb672; 46 | } 47 | 48 | a:hover, a:active { 49 | outline: none; /* prevents outline in webkit on active links but retains it for tab focus */ 50 | } 51 | 52 | h1, h2, h3 { 53 | font-weight: normal; 54 | font-size: 1.25em; 55 | margin: 0.8em 0 0.3em 0; 56 | } 57 | 58 | ul { 59 | padding: 0; 60 | } 61 | 62 | img { 63 | border: 0; 64 | } 65 | 66 | /* GENERAL */ 67 | 68 | #grailsLogo a { 69 | display: inline-block; 70 | margin: 1em; 71 | } 72 | 73 | .content { 74 | } 75 | 76 | .content h1 { 77 | border-bottom: 1px solid #CCCCCC; 78 | margin: 0.8em 1em 0.3em; 79 | padding: 0 0.25em; 80 | } 81 | 82 | .scaffold-list h1 { 83 | border: none; 84 | } 85 | 86 | .footer { 87 | background: #424649; 88 | color: #ffffff; 89 | clear: both; 90 | font-size: 0.8em; 91 | margin-top: 1.5em; 92 | padding: 1em; 93 | min-height: 1em; 94 | } 95 | 96 | .footer a { 97 | color: #feb672; 98 | } 99 | 100 | .spinner { 101 | background: url(../images/spinner.gif) 50% 50% no-repeat transparent; 102 | height: 16px; 103 | width: 16px; 104 | padding: 0.5em; 105 | position: absolute; 106 | right: 0; 107 | top: 0; 108 | text-indent: -9999px; 109 | } 110 | 111 | /* NAVIGATION MENU */ 112 | 113 | .nav { 114 | zoom: 1; 115 | } 116 | 117 | .nav ul { 118 | overflow: hidden; 119 | padding-left: 0; 120 | zoom: 1; 121 | } 122 | 123 | .nav li { 124 | display: block; 125 | float: left; 126 | list-style-type: none; 127 | margin-right: 0.5em; 128 | padding: 0; 129 | } 130 | 131 | .nav a { 132 | color: #666666; 133 | display: block; 134 | padding: 0.25em 0.7em; 135 | text-decoration: none; 136 | -moz-border-radius: 0.3em; 137 | -webkit-border-radius: 0.3em; 138 | border-radius: 0.3em; 139 | } 140 | 141 | .nav a:active, .nav a:visited { 142 | color: #666666; 143 | } 144 | 145 | .nav a:focus, .nav a:hover { 146 | background-color: #999999; 147 | color: #ffffff; 148 | outline: none; 149 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); 150 | } 151 | 152 | .no-borderradius .nav a:focus, .no-borderradius .nav a:hover { 153 | background-color: transparent; 154 | color: #444444; 155 | text-decoration: underline; 156 | } 157 | 158 | .nav a.home, .nav a.list, .nav a.create { 159 | background-position: 0.7em center; 160 | background-repeat: no-repeat; 161 | text-indent: 25px; 162 | } 163 | 164 | .nav a.home { 165 | background-image: url(../images/skin/house.png); 166 | } 167 | 168 | .nav a.list { 169 | background-image: url(../images/skin/database_table.png); 170 | } 171 | 172 | .nav a.create { 173 | background-image: url(../images/skin/database_add.png); 174 | } 175 | 176 | .nav li.dropdown.open ul.dropdown-menu { 177 | background-color: #424649; 178 | } 179 | 180 | /* CREATE/EDIT FORMS AND SHOW PAGES */ 181 | 182 | fieldset, 183 | .property-list { 184 | margin: 0.6em 1.25em 0 1.25em; 185 | padding: 0.3em 1.8em 1.25em; 186 | position: relative; 187 | zoom: 1; 188 | border: none; 189 | } 190 | 191 | .property-list .fieldcontain { 192 | list-style: none; 193 | overflow: hidden; 194 | zoom: 1; 195 | } 196 | 197 | .fieldcontain { 198 | margin-top: 1em; 199 | } 200 | 201 | .fieldcontain label, 202 | .fieldcontain .property-label { 203 | color: #666666; 204 | text-align: right; 205 | width: 25%; 206 | } 207 | 208 | .fieldcontain .property-label { 209 | float: left; 210 | } 211 | 212 | .fieldcontain .property-value { 213 | display: block; 214 | margin-left: 27%; 215 | } 216 | 217 | label { 218 | cursor: pointer; 219 | display: inline-block; 220 | margin: 0 0.25em 0 0; 221 | } 222 | 223 | input, select, textarea { 224 | background-color: #fcfcfc; 225 | border: 1px solid #cccccc; 226 | font-size: 1em; 227 | padding: 0.2em 0.4em; 228 | } 229 | 230 | select { 231 | padding: 0.2em 0.2em 0.2em 0; 232 | } 233 | 234 | select[multiple] { 235 | vertical-align: top; 236 | } 237 | 238 | textarea { 239 | width: 250px; 240 | height: 150px; 241 | overflow: auto; /* IE always renders vertical scrollbar without this */ 242 | vertical-align: top; 243 | } 244 | 245 | input[type=checkbox], input[type=radio] { 246 | background-color: transparent; 247 | border: 0; 248 | padding: 0; 249 | } 250 | 251 | input:focus, select:focus, textarea:focus { 252 | background-color: #ffffff; 253 | border: 1px solid #eeeeee; 254 | outline: 0; 255 | -moz-box-shadow: 0 0 0.5em #ffffff; 256 | -webkit-box-shadow: 0 0 0.5em #ffffff; 257 | box-shadow: 0 0 0.5em #ffffff; 258 | } 259 | 260 | .required-indicator { 261 | color: #cc0000; 262 | display: inline-block; 263 | font-weight: bold; 264 | margin-left: 0.3em; 265 | position: relative; 266 | top: 0.1em; 267 | } 268 | 269 | ul.one-to-many { 270 | display: inline-block; 271 | list-style-position: inside; 272 | vertical-align: top; 273 | } 274 | 275 | ul.one-to-many li.add { 276 | list-style-type: none; 277 | } 278 | 279 | /* EMBEDDED PROPERTIES */ 280 | 281 | fieldset.embedded { 282 | background-color: transparent; 283 | border: 1px solid #CCCCCC; 284 | margin-left: 0; 285 | margin-right: 0; 286 | padding-left: 0; 287 | padding-right: 0; 288 | -moz-box-shadow: none; 289 | -webkit-box-shadow: none; 290 | box-shadow: none; 291 | } 292 | 293 | fieldset.embedded legend { 294 | margin: 0 1em; 295 | } 296 | 297 | /* MESSAGES AND ERRORS */ 298 | 299 | .errors, 300 | .message { 301 | font-size: 0.8em; 302 | line-height: 2; 303 | margin: 1em 2em; 304 | padding: 0.25em; 305 | } 306 | 307 | .message { 308 | background: #f3f3ff; 309 | border: 1px solid #b2d1ff; 310 | color: #006dba; 311 | -moz-box-shadow: 0 0 0.25em #b2d1ff; 312 | -webkit-box-shadow: 0 0 0.25em #b2d1ff; 313 | box-shadow: 0 0 0.25em #b2d1ff; 314 | } 315 | 316 | .errors { 317 | background: #fff3f3; 318 | border: 1px solid #ffaaaa; 319 | color: #cc0000; 320 | -moz-box-shadow: 0 0 0.25em #ff8888; 321 | -webkit-box-shadow: 0 0 0.25em #ff8888; 322 | box-shadow: 0 0 0.25em #ff8888; 323 | } 324 | 325 | .errors ul, 326 | .message { 327 | padding: 0; 328 | } 329 | 330 | .errors li { 331 | list-style: none; 332 | background: transparent url(../images/skin/exclamation.png) 0.5em 50% no-repeat; 333 | text-indent: 2.2em; 334 | } 335 | 336 | .message { 337 | background: transparent url(../images/skin/information.png) 0.5em 50% no-repeat; 338 | text-indent: 2.2em; 339 | } 340 | 341 | /* form fields with errors */ 342 | 343 | .error input, .error select, .error textarea { 344 | background: #fff3f3; 345 | border-color: #ffaaaa; 346 | color: #cc0000; 347 | } 348 | 349 | .error input:focus, .error select:focus, .error textarea:focus { 350 | -moz-box-shadow: 0 0 0.5em #ffaaaa; 351 | -webkit-box-shadow: 0 0 0.5em #ffaaaa; 352 | box-shadow: 0 0 0.5em #ffaaaa; 353 | } 354 | 355 | /* same effects for browsers that support HTML5 client-side validation (these have to be specified separately or IE will ignore the entire rule) */ 356 | 357 | input:invalid, select:invalid, textarea:invalid { 358 | background: #fff3f3; 359 | border-color: #ffaaaa; 360 | color: #cc0000; 361 | } 362 | 363 | input:invalid:focus, select:invalid:focus, textarea:invalid:focus { 364 | -moz-box-shadow: 0 0 0.5em #ffaaaa; 365 | -webkit-box-shadow: 0 0 0.5em #ffaaaa; 366 | box-shadow: 0 0 0.5em #ffaaaa; 367 | } 368 | 369 | /* TABLES */ 370 | 371 | table { 372 | border-top: 1px solid #DFDFDF; 373 | border-collapse: collapse; 374 | width: 100%; 375 | margin-bottom: 1em; 376 | } 377 | 378 | tr { 379 | border: 0; 380 | } 381 | 382 | tr>td:first-child, tr>th:first-child { 383 | padding-left: 1.25em; 384 | } 385 | 386 | tr>td:last-child, tr>th:last-child { 387 | padding-right: 1.25em; 388 | } 389 | 390 | td, th { 391 | line-height: 1.5em; 392 | padding: 0.5em 0.6em; 393 | text-align: left; 394 | vertical-align: top; 395 | } 396 | 397 | th { 398 | background-color: #efefef; 399 | background-image: -moz-linear-gradient(top, #ffffff, #eaeaea); 400 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), color-stop(1, #eaeaea)); 401 | filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#ffffff', EndColorStr = '#eaeaea'); 402 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#eaeaea')"; 403 | color: #666666; 404 | font-weight: bold; 405 | line-height: 1.7em; 406 | padding: 0.2em 0.6em; 407 | } 408 | 409 | thead th { 410 | white-space: nowrap; 411 | } 412 | 413 | th a { 414 | display: block; 415 | text-decoration: none; 416 | } 417 | 418 | th a:link, th a:visited { 419 | color: #666666; 420 | } 421 | 422 | th a:hover, th a:focus { 423 | color: #333333; 424 | } 425 | 426 | th.sortable a { 427 | background-position: right; 428 | background-repeat: no-repeat; 429 | padding-right: 1.1em; 430 | } 431 | 432 | th.asc a { 433 | background-image: url(../images/skin/sorted_asc.gif); 434 | } 435 | 436 | th.desc a { 437 | background-image: url(../images/skin/sorted_desc.gif); 438 | } 439 | 440 | .odd { 441 | background: #f7f7f7; 442 | } 443 | 444 | .even { 445 | background: #ffffff; 446 | } 447 | 448 | th:hover, tr:hover { 449 | background: #f5f5f5; 450 | } 451 | 452 | /* PAGINATION */ 453 | 454 | .pagination { 455 | border-top: 0; 456 | margin: 0.8em 1em 0.3em; 457 | padding: 0.3em 0.2em; 458 | text-align: center; 459 | -moz-box-shadow: 0 0 3px 1px #AAAAAA; 460 | -webkit-box-shadow: 0 0 3px 1px #AAAAAA; 461 | box-shadow: 0 0 3px 1px #AAAAAA; 462 | background-color: #EFEFEF; 463 | } 464 | 465 | .pagination a, 466 | .pagination .currentStep { 467 | color: #666666; 468 | display: inline-block; 469 | margin: 0 0.1em; 470 | padding: 0.25em 0.7em; 471 | text-decoration: none; 472 | -moz-border-radius: 0.3em; 473 | -webkit-border-radius: 0.3em; 474 | border-radius: 0.3em; 475 | } 476 | 477 | .pagination a:hover, .pagination a:focus, 478 | .pagination .currentStep { 479 | background-color: #999999; 480 | color: #ffffff; 481 | outline: none; 482 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); 483 | } 484 | 485 | .no-borderradius .pagination a:hover, .no-borderradius .pagination a:focus, 486 | .no-borderradius .pagination .currentStep { 487 | background-color: transparent; 488 | color: #444444; 489 | text-decoration: underline; 490 | } 491 | 492 | /* ACTION BUTTONS */ 493 | 494 | .buttons { 495 | background-color: #efefef; 496 | overflow: hidden; 497 | padding: 0.3em; 498 | -moz-box-shadow: 0 0 3px 1px #aaaaaa; 499 | -webkit-box-shadow: 0 0 3px 1px #aaaaaa; 500 | box-shadow: 0 0 3px 1px #aaaaaa; 501 | margin: 0.1em 0 0 0; 502 | border: none; 503 | } 504 | 505 | .buttons input, 506 | .buttons a { 507 | background-color: transparent; 508 | border: 0; 509 | color: #666666; 510 | cursor: pointer; 511 | display: inline-block; 512 | margin: 0 0.25em 0; 513 | overflow: visible; 514 | padding: 0.25em 0.7em; 515 | text-decoration: none; 516 | 517 | -moz-border-radius: 0.3em; 518 | -webkit-border-radius: 0.3em; 519 | border-radius: 0.3em; 520 | } 521 | 522 | .buttons input:hover, .buttons input:focus, 523 | .buttons a:hover, .buttons a:focus { 524 | background-color: #999999; 525 | color: #ffffff; 526 | outline: none; 527 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); 528 | -moz-box-shadow: none; 529 | -webkit-box-shadow: none; 530 | box-shadow: none; 531 | } 532 | 533 | .no-borderradius .buttons input:hover, .no-borderradius .buttons input:focus, 534 | .no-borderradius .buttons a:hover, .no-borderradius .buttons a:focus { 535 | background-color: transparent; 536 | color: #444444; 537 | text-decoration: underline; 538 | } 539 | 540 | .buttons .delete, .buttons .edit, .buttons .save { 541 | background-position: 0.7em center; 542 | background-repeat: no-repeat; 543 | text-indent: 25px; 544 | } 545 | 546 | .buttons .delete { 547 | background-image: url(../images/skin/database_delete.png); 548 | } 549 | 550 | .buttons .edit { 551 | background-image: url(../images/skin/database_edit.png); 552 | } 553 | 554 | .buttons .save { 555 | background-image: url(../images/skin/database_save.png); 556 | } 557 | 558 | a.skip { 559 | position: absolute; 560 | left: -9999px; 561 | } 562 | 563 | .grails-logo-container { 564 | background: #7c7c7c no-repeat 50% 30%; 565 | margin-bottom: 20px; 566 | color: white; 567 | height:300px; 568 | text-align:center; 569 | } 570 | 571 | img.grails-logo { 572 | height:340px; 573 | margin-top:-10px; 574 | } 575 | -------------------------------------------------------------------------------- /example/grails-app/assets/stylesheets/mobile.css: -------------------------------------------------------------------------------- 1 | /* Styles for mobile devices */ 2 | 3 | @media screen and (max-width: 480px) { 4 | .nav { 5 | padding: 0.5em; 6 | } 7 | 8 | .nav li { 9 | margin: 0 0.5em 0 0; 10 | padding: 0.25em; 11 | } 12 | 13 | /* Hide individual steps in pagination, just have next & previous */ 14 | .pagination .step, .pagination .currentStep { 15 | display: none; 16 | } 17 | 18 | .pagination .prevLink { 19 | float: left; 20 | } 21 | 22 | .pagination .nextLink { 23 | float: right; 24 | } 25 | 26 | /* pagination needs to wrap around floated buttons */ 27 | .pagination { 28 | overflow: hidden; 29 | } 30 | 31 | /* slightly smaller margin around content body */ 32 | fieldset, 33 | .property-list { 34 | padding: 0.3em 1em 1em; 35 | } 36 | 37 | input, textarea { 38 | width: 100%; 39 | -moz-box-sizing: border-box; 40 | -webkit-box-sizing: border-box; 41 | -ms-box-sizing: border-box; 42 | box-sizing: border-box; 43 | } 44 | 45 | select, input[type=checkbox], input[type=radio], input[type=submit], input[type=button], input[type=reset] { 46 | width: auto; 47 | } 48 | 49 | /* hide all but the first column of list tables */ 50 | .scaffold-list td:not(:first-child), 51 | .scaffold-list th:not(:first-child) { 52 | display: none; 53 | } 54 | 55 | .scaffold-list thead th { 56 | text-align: center; 57 | } 58 | 59 | /* stack form elements */ 60 | .fieldcontain { 61 | margin-top: 0.6em; 62 | } 63 | 64 | .fieldcontain label, 65 | .fieldcontain .property-label, 66 | .fieldcontain .property-value { 67 | display: block; 68 | float: none; 69 | margin: 0 0 0.25em 0; 70 | text-align: left; 71 | width: auto; 72 | } 73 | 74 | .errors ul, 75 | .message p { 76 | margin: 0.5em; 77 | } 78 | 79 | .error ul { 80 | margin-left: 0; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /example/grails-app/conf/application.yml: -------------------------------------------------------------------------------- 1 | --- 2 | grails: 3 | profile: web 4 | codegen: 5 | defaultPackage: example 6 | gorm: 7 | reactor: 8 | # Whether to translate GORM events into Reactor events 9 | # Disabled by default for performance reasons 10 | events: false 11 | info: 12 | app: 13 | name: '@info.app.name@' 14 | version: '@info.app.version@' 15 | grailsVersion: '@info.app.grailsVersion@' 16 | spring: 17 | main: 18 | banner-mode: "off" 19 | groovy: 20 | template: 21 | check-template-location: false 22 | 23 | # Spring Actuator Endpoints are Disabled by Default 24 | endpoints: 25 | enabled: false 26 | jmx: 27 | enabled: true 28 | 29 | --- 30 | grails: 31 | mime: 32 | disable: 33 | accept: 34 | header: 35 | userAgents: 36 | - Gecko 37 | - WebKit 38 | - Presto 39 | - Trident 40 | types: 41 | all: '*/*' 42 | atom: application/atom+xml 43 | css: text/css 44 | csv: text/csv 45 | form: application/x-www-form-urlencoded 46 | html: 47 | - text/html 48 | - application/xhtml+xml 49 | js: text/javascript 50 | json: 51 | - application/json 52 | - text/json 53 | multipartForm: multipart/form-data 54 | pdf: application/pdf 55 | rss: application/rss+xml 56 | text: text/plain 57 | hal: 58 | - application/hal+json 59 | - application/hal+xml 60 | xml: 61 | - text/xml 62 | - application/xml 63 | urlmapping: 64 | cache: 65 | maxsize: 1000 66 | controllers: 67 | defaultScope: singleton 68 | converters: 69 | encoding: UTF-8 70 | views: 71 | default: 72 | codec: html 73 | gsp: 74 | encoding: UTF-8 75 | htmlcodec: xml 76 | codecs: 77 | expression: html 78 | scriptlets: html 79 | taglib: none 80 | staticparts: none 81 | endpoints: 82 | jmx: 83 | unique-names: true 84 | 85 | --- 86 | hibernate: 87 | cache: 88 | queries: false 89 | use_second_level_cache: false 90 | use_query_cache: false 91 | dataSource: 92 | pooled: true 93 | jmxExport: true 94 | driverClassName: org.h2.Driver 95 | username: sa 96 | password: '' 97 | 98 | environments: 99 | development: 100 | dataSource: 101 | dbCreate: create-drop 102 | url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE 103 | test: 104 | dataSource: 105 | dbCreate: update 106 | url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE 107 | production: 108 | dataSource: 109 | dbCreate: none 110 | url: jdbc:h2:./prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE 111 | properties: 112 | jmxEnabled: true 113 | initialSize: 5 114 | maxActive: 50 115 | minIdle: 5 116 | maxIdle: 25 117 | maxWait: 10000 118 | maxAge: 600000 119 | timeBetweenEvictionRunsMillis: 5000 120 | minEvictableIdleTimeMillis: 60000 121 | validationQuery: SELECT 1 122 | validationQueryTimeout: 3 123 | validationInterval: 15000 124 | testOnBorrow: true 125 | testWhileIdle: true 126 | testOnReturn: false 127 | jdbcInterceptors: ConnectionState 128 | defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED 129 | -------------------------------------------------------------------------------- /example/grails-app/conf/logback.groovy: -------------------------------------------------------------------------------- 1 | import grails.util.BuildSettings 2 | import grails.util.Environment 3 | import org.springframework.boot.logging.logback.ColorConverter 4 | import org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter 5 | 6 | import java.nio.charset.Charset 7 | 8 | conversionRule 'clr', ColorConverter 9 | conversionRule 'wex', WhitespaceThrowableProxyConverter 10 | 11 | // See http://logback.qos.ch/manual/groovy.html for details on configuration 12 | appender('STDOUT', ConsoleAppender) { 13 | encoder(PatternLayoutEncoder) { 14 | charset = Charset.forName('UTF-8') 15 | 16 | pattern = 17 | '%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} ' + // Date 18 | '%clr(%5p) ' + // Log level 19 | '%clr(---){faint} %clr([%15.15t]){faint} ' + // Thread 20 | '%clr(%-40.40logger{39}){cyan} %clr(:){faint} ' + // Logger 21 | '%m%n%wex' // Message 22 | } 23 | } 24 | 25 | def targetDir = BuildSettings.TARGET_DIR 26 | if (Environment.isDevelopmentMode() && targetDir != null) { 27 | appender("FULL_STACKTRACE", FileAppender) { 28 | file = "${targetDir}/stacktrace.log" 29 | append = true 30 | encoder(PatternLayoutEncoder) { 31 | pattern = "%level %logger - %msg%n" 32 | } 33 | } 34 | logger("StackTrace", ERROR, ['FULL_STACKTRACE'], false) 35 | } 36 | root(ERROR, ['STDOUT']) 37 | -------------------------------------------------------------------------------- /example/grails-app/conf/spring/resources.groovy: -------------------------------------------------------------------------------- 1 | // Place your Spring DSL code here 2 | beans = { 3 | } 4 | -------------------------------------------------------------------------------- /example/grails-app/controllers/example/PostController.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import grails.validation.ValidationException 4 | import static org.springframework.http.HttpStatus.* 5 | 6 | class PostController { 7 | 8 | PostService postService 9 | 10 | static allowedMethods = [save: "POST", update: "PUT", delete: "DELETE"] 11 | 12 | def index(Integer max) { 13 | params.max = Math.min(max ?: 10, 100) 14 | respond postService.list(params), model:[postCount: postService.count()] 15 | } 16 | 17 | def show(Long id) { 18 | respond postService.get(id) 19 | } 20 | 21 | def create() { 22 | respond new Post(params) 23 | } 24 | 25 | def save(Post post) { 26 | if (post == null) { 27 | notFound() 28 | return 29 | } 30 | 31 | try { 32 | postService.save(post) 33 | } catch (ValidationException e) { 34 | respond post.errors, view:'create' 35 | return 36 | } 37 | 38 | request.withFormat { 39 | form multipartForm { 40 | flash.message = message(code: 'default.created.message', args: [message(code: 'post.label', default: 'Post'), post.id]) 41 | redirect post 42 | } 43 | '*' { respond post, [status: CREATED] } 44 | } 45 | } 46 | 47 | def edit(Long id) { 48 | respond postService.get(id) 49 | } 50 | 51 | def update(Post post) { 52 | if (post == null) { 53 | notFound() 54 | return 55 | } 56 | 57 | try { 58 | postService.save(post) 59 | } catch (ValidationException e) { 60 | respond post.errors, view:'edit' 61 | return 62 | } 63 | 64 | request.withFormat { 65 | form multipartForm { 66 | flash.message = message(code: 'default.updated.message', args: [message(code: 'post.label', default: 'Post'), post.id]) 67 | redirect post 68 | } 69 | '*'{ respond post, [status: OK] } 70 | } 71 | } 72 | 73 | def delete(Long id) { 74 | if (id == null) { 75 | notFound() 76 | return 77 | } 78 | 79 | postService.delete(id) 80 | 81 | request.withFormat { 82 | form multipartForm { 83 | flash.message = message(code: 'default.deleted.message', args: [message(code: 'post.label', default: 'Post'), id]) 84 | redirect action:"index", method:"GET" 85 | } 86 | '*'{ render status: NO_CONTENT } 87 | } 88 | } 89 | 90 | protected void notFound() { 91 | request.withFormat { 92 | form multipartForm { 93 | flash.message = message(code: 'default.not.found.message', args: [message(code: 'post.label', default: 'Post'), params.id]) 94 | redirect action: "index", method: "GET" 95 | } 96 | '*'{ render status: NOT_FOUND } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /example/grails-app/controllers/example/UrlMappings.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | class UrlMappings { 4 | 5 | static mappings = { 6 | "/$controller/$action?/$id?(.$format)?"{ 7 | constraints { 8 | // apply constraints here 9 | } 10 | } 11 | 12 | "/"(view:"/index") 13 | "500"(view:'/error') 14 | "404"(view:'/notFound') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/grails-app/domain/example/Comment.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | class Comment { 4 | String text 5 | 6 | static constraints = { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/grails-app/domain/example/Post.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | class Post { 4 | String text 5 | int rating 6 | Date created = new Date() 7 | User createdBy 8 | 9 | static hasMany = [comments: Comment] 10 | 11 | static constraints = { 12 | text(size:10..5000) 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /example/grails-app/domain/example/User.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | class User { 4 | String name 5 | 6 | static constraints = { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages.properties: -------------------------------------------------------------------------------- 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 56 | typeMismatch=Property {0} is type-mismatched 57 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_cs.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] neodpovídá požadovanému vzoru [{3}] 2 | default.invalid.url.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní URL 3 | default.invalid.creditCard.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní číslo kreditní karty 4 | default.invalid.email.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není validní emailová adresa 5 | default.invalid.range.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není v povoleném rozmezí od [{3}] do [{4}] 6 | default.invalid.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není v povoleném rozmezí od [{3}] do [{4}] 7 | default.invalid.max.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] překračuje maximální povolenou hodnotu [{3}] 8 | default.invalid.min.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] je menší než minimální povolená hodnota [{3}] 9 | default.invalid.max.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] překračuje maximální velikost [{3}] 10 | default.invalid.min.size.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] je menší než minimální velikost [{3}] 11 | default.invalid.validator.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] neprošla validací 12 | default.not.inlist.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] není obsažena v seznamu [{3}] 13 | default.blank.message=Položka [{0}] třídy [{1}] nemůže být prázdná 14 | default.not.equal.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] nemůže být stejná jako [{3}] 15 | default.null.message=Položka [{0}] třídy [{1}] nemůže být prázdná 16 | default.not.unique.message=Položka [{0}] třídy [{1}] o hodnotě [{2}] musí být unikátní 17 | 18 | default.paginate.prev=Předcházející 19 | default.paginate.next=Následující 20 | default.boolean.true=Pravda 21 | default.boolean.false=Nepravda 22 | default.date.format=dd. MM. yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} vytvořeno 26 | default.updated.message={0} {1} aktualizováno 27 | default.deleted.message={0} {1} smazáno 28 | default.not.deleted.message={0} {1} nelze smazat 29 | default.not.found.message={0} nenalezen s id {1} 30 | default.optimistic.locking.failure=Jiný uživatel aktualizoval záznam {0}, právě když byl vámi editován 31 | 32 | default.home.label=Domů 33 | default.list.label={0} Seznam 34 | default.add.label=Přidat {0} 35 | default.new.label=Nový {0} 36 | default.create.label=Vytvořit {0} 37 | default.show.label=Ukázat {0} 38 | default.edit.label=Editovat {0} 39 | 40 | default.button.create.label=Vytvoř 41 | default.button.edit.label=Edituj 42 | default.button.update.label=Aktualizuj 43 | default.button.delete.label=Smaž 44 | default.button.delete.confirm.message=Jste si jistý? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Položka {0} musí být validní URL 48 | typeMismatch.java.net.URI=Položka {0} musí být validní URI 49 | typeMismatch.java.util.Date=Položka {0} musí být validní datum 50 | typeMismatch.java.lang.Double=Položka {0} musí být validní desetinné číslo 51 | typeMismatch.java.lang.Integer=Položka {0} musí být validní číslo 52 | typeMismatch.java.lang.Long=Položka {0} musí být validní číslo 53 | typeMismatch.java.lang.Short=Položka {0} musí být validní číslo 54 | typeMismatch.java.math.BigDecimal=Položka {0} musí být validní číslo 55 | typeMismatch.java.math.BigInteger=Položka {0} musí být validní číslo 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_da.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overholder ikke mønsteret [{3}] 2 | default.invalid.url.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke en gyldig URL 3 | default.invalid.creditCard.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke et gyldigt kreditkortnummer 4 | default.invalid.email.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er ikke en gyldig e-mail adresse 5 | default.invalid.range.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] ligger ikke inden for intervallet fra [{3}] til [{4}] 6 | default.invalid.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] ligger ikke inden for størrelsen fra [{3}] til [{4}] 7 | default.invalid.max.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overstiger den maksimale værdi [{3}] 8 | default.invalid.min.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er under den minimale værdi [{3}] 9 | default.invalid.max.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overstiger den maksimale størrelse på [{3}] 10 | default.invalid.min.size.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] er under den minimale størrelse på [{3}] 11 | default.invalid.validator.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] overholder ikke den brugerdefinerede validering 12 | default.not.inlist.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] findes ikke i listen [{3}] 13 | default.blank.message=Feltet [{0}] i klassen [{1}] kan ikke være tom 14 | default.not.equal.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] må ikke være [{3}] 15 | default.null.message=Feltet [{0}] i klassen [{1}] kan ikke være null 16 | default.not.unique.message=Feltet [{0}] i klassen [{1}] som har værdien [{2}] skal være unik 17 | 18 | default.paginate.prev=Forrige 19 | default.paginate.next=Næste 20 | default.boolean.true=Sand 21 | default.boolean.false=Falsk 22 | default.date.format=yyyy-MM-dd HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} oprettet 26 | default.updated.message={0} {1} opdateret 27 | default.deleted.message={0} {1} slettet 28 | default.not.deleted.message={0} {1} kunne ikke slettes 29 | default.not.found.message={0} med id {1} er ikke fundet 30 | default.optimistic.locking.failure=En anden bruger har opdateret denne {0} imens du har lavet rettelser 31 | 32 | default.home.label=Hjem 33 | default.list.label={0} Liste 34 | default.add.label=Tilføj {0} 35 | default.new.label=Ny {0} 36 | default.create.label=Opret {0} 37 | default.show.label=Vis {0} 38 | default.edit.label=Ret {0} 39 | 40 | default.button.create.label=Opret 41 | default.button.edit.label=Ret 42 | default.button.update.label=Opdater 43 | default.button.delete.label=Slet 44 | default.button.delete.confirm.message=Er du sikker? 45 | 46 | # Databindingsfejl. Brug "typeMismatch.$className.$propertyName for at passe til en given klasse (f.eks typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Feltet {0} skal være en valid URL 48 | typeMismatch.java.net.URI=Feltet {0} skal være en valid URI 49 | typeMismatch.java.util.Date=Feltet {0} skal være en valid Dato 50 | typeMismatch.java.lang.Double=Feltet {0} skal være et valid tal 51 | typeMismatch.java.lang.Integer=Feltet {0} skal være et valid tal 52 | typeMismatch.java.lang.Long=Feltet {0} skal være et valid tal 53 | typeMismatch.java.lang.Short=Feltet {0} skal være et valid tal 54 | typeMismatch.java.math.BigDecimal=Feltet {0} skal være et valid tal 55 | typeMismatch.java.math.BigInteger=Feltet {0} skal være et valid tal 56 | 57 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_de.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] entspricht nicht dem vorgegebenen Muster [{3}] 2 | default.invalid.url.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige URL 3 | default.invalid.creditCard.message=Das Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige Kreditkartennummer 4 | default.invalid.email.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist keine gültige E-Mail Adresse 5 | default.invalid.range.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht im Wertebereich von [{3}] bis [{4}] 6 | default.invalid.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht im Wertebereich von [{3}] bis [{4}] 7 | default.invalid.max.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist größer als der Höchstwert von [{3}] 8 | default.invalid.min.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist kleiner als der Mindestwert von [{3}] 9 | default.invalid.max.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] übersteigt den Höchstwert von [{3}] 10 | default.invalid.min.size.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] unterschreitet den Mindestwert von [{3}] 11 | default.invalid.validator.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist ungültig 12 | default.not.inlist.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] ist nicht in der Liste [{3}] enthalten. 13 | default.blank.message=Die Eigenschaft [{0}] des Typs [{1}] darf nicht leer sein 14 | default.not.equal.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] darf nicht gleich [{3}] sein 15 | default.null.message=Die Eigenschaft [{0}] des Typs [{1}] darf nicht null sein 16 | default.not.unique.message=Die Eigenschaft [{0}] des Typs [{1}] mit dem Wert [{2}] darf nur einmal vorkommen 17 | 18 | default.paginate.prev=Vorherige 19 | default.paginate.next=Nächste 20 | default.boolean.true=Wahr 21 | default.boolean.false=Falsch 22 | default.date.format=dd.MM.yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} wurde angelegt 26 | default.updated.message={0} {1} wurde geändert 27 | default.deleted.message={0} {1} wurde gelöscht 28 | default.not.deleted.message={0} {1} konnte nicht gelöscht werden 29 | default.not.found.message={0} mit der id {1} wurde nicht gefunden 30 | default.optimistic.locking.failure=Ein anderer Benutzer hat das {0} Object geändert während Sie es bearbeitet haben 31 | 32 | default.home.label=Home 33 | default.list.label={0} Liste 34 | default.add.label={0} hinzufügen 35 | default.new.label={0} anlegen 36 | default.create.label={0} anlegen 37 | default.show.label={0} anzeigen 38 | default.edit.label={0} bearbeiten 39 | 40 | default.button.create.label=Anlegen 41 | default.button.edit.label=Bearbeiten 42 | default.button.update.label=Aktualisieren 43 | default.button.delete.label=Löschen 44 | default.button.delete.confirm.message=Sind Sie sicher? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Die Eigenschaft {0} muss eine gültige URL sein 48 | typeMismatch.java.net.URI=Die Eigenschaft {0} muss eine gültige URI sein 49 | typeMismatch.java.util.Date=Die Eigenschaft {0} muss ein gültiges Datum sein 50 | typeMismatch.java.lang.Double=Die Eigenschaft {0} muss eine gültige Zahl sein 51 | typeMismatch.java.lang.Integer=Die Eigenschaft {0} muss eine gültige Zahl sein 52 | typeMismatch.java.lang.Long=Die Eigenschaft {0} muss eine gültige Zahl sein 53 | typeMismatch.java.lang.Short=Die Eigenschaft {0} muss eine gültige Zahl sein 54 | typeMismatch.java.math.BigDecimal=Die Eigenschaft {0} muss eine gültige Zahl sein 55 | typeMismatch.java.math.BigInteger=Die Eigenschaft {0} muss eine gültige Zahl sein 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_es.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no corresponde al patrón [{3}] 2 | default.invalid.url.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es una URL válida 3 | default.invalid.creditCard.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es un número de tarjeta de crédito válida 4 | default.invalid.email.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es una dirección de correo electrónico válida 5 | default.invalid.range.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no entra en el rango válido de [{3}] a [{4}] 6 | default.invalid.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no entra en el tamaño válido de [{3}] a [{4}] 7 | default.invalid.max.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] excede el valor máximo [{3}] 8 | default.invalid.min.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] es menos que el valor mínimo [{3}] 9 | default.invalid.max.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] excede el tamaño máximo de [{3}] 10 | default.invalid.min.size.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] es menor que el tamaño mínimo de [{3}] 11 | default.invalid.validator.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no es válido 12 | default.not.inlist.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no esta contenido dentro de la lista [{3}] 13 | default.blank.message=La propiedad [{0}] de la clase [{1}] no puede ser vacía 14 | default.not.equal.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] no puede igualar a [{3}] 15 | default.null.message=La propiedad [{0}] de la clase [{1}] no puede ser nulo 16 | default.not.unique.message=La propiedad [{0}] de la clase [{1}] con valor [{2}] debe ser única 17 | 18 | default.paginate.prev=Anterior 19 | default.paginate.next=Siguiente 20 | default.boolean.true=Verdadero 21 | default.boolean.false=Falso 22 | default.date.format=yyyy-MM-dd HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} creado 26 | default.updated.message={0} {1} actualizado 27 | default.deleted.message={0} {1} eliminado 28 | default.not.deleted.message={0} {1} no puede eliminarse 29 | default.not.found.message=No se encuentra {0} con id {1} 30 | default.optimistic.locking.failure=Mientras usted editaba, otro usuario ha actualizado su {0} 31 | 32 | default.home.label=Principal 33 | default.list.label={0} Lista 34 | default.add.label=Agregar {0} 35 | default.new.label=Nuevo {0} 36 | default.create.label=Crear {0} 37 | default.show.label=Mostrar {0} 38 | default.edit.label=Editar {0} 39 | 40 | default.button.create.label=Crear 41 | default.button.edit.label=Editar 42 | default.button.update.label=Actualizar 43 | default.button.delete.label=Eliminar 44 | default.button.delete.confirm.message=¿Está usted seguro? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=La propiedad {0} debe ser una URL válida 48 | typeMismatch.java.net.URI=La propiedad {0} debe ser una URI válida 49 | typeMismatch.java.util.Date=La propiedad {0} debe ser una fecha válida 50 | typeMismatch.java.lang.Double=La propiedad {0} debe ser un número válido 51 | typeMismatch.java.lang.Integer=La propiedad {0} debe ser un número válido 52 | typeMismatch.java.lang.Long=La propiedad {0} debe ser un número válido 53 | typeMismatch.java.lang.Short=La propiedad {0} debe ser un número válido 54 | typeMismatch.java.math.BigDecimal=La propiedad {0} debe ser un número válido 55 | typeMismatch.java.math.BigInteger=La propiedad {0} debe ser un número válido -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_fr.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne correspond pas au pattern [{3}] 2 | default.invalid.url.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas une URL valide 3 | default.invalid.creditCard.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas un numéro de carte de crédit valide 4 | default.invalid.email.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas une adresse e-mail valide 5 | default.invalid.range.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas contenue dans l'intervalle [{3}] à [{4}] 6 | default.invalid.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas contenue dans l'intervalle [{3}] à [{4}] 7 | default.invalid.max.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est supérieure à la valeur maximum [{3}] 8 | default.invalid.min.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est inférieure à la valeur minimum [{3}] 9 | default.invalid.max.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est supérieure à la valeur maximum [{3}] 10 | default.invalid.min.size.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] est inférieure à la valeur minimum [{3}] 11 | default.invalid.validator.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] n'est pas valide 12 | default.not.inlist.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne fait pas partie de la liste [{3}] 13 | default.blank.message=La propriété [{0}] de la classe [{1}] ne peut pas être vide 14 | default.not.equal.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] ne peut pas être égale à [{3}] 15 | default.null.message=La propriété [{0}] de la classe [{1}] ne peut pas être nulle 16 | default.not.unique.message=La propriété [{0}] de la classe [{1}] avec la valeur [{2}] doit être unique 17 | 18 | default.paginate.prev=Précédent 19 | default.paginate.next=Suivant 20 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_it.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non corrisponde al pattern [{3}] 2 | default.invalid.url.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un URL valido 3 | default.invalid.creditCard.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un numero di carta di credito valido 4 | default.invalid.email.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è un indirizzo email valido 5 | default.invalid.range.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non rientra nell'intervallo valido da [{3}] a [{4}] 6 | default.invalid.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non rientra nell'intervallo di dimensioni valide da [{3}] a [{4}] 7 | default.invalid.max.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è maggiore di [{3}] 8 | default.invalid.min.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è minore di [{3}] 9 | default.invalid.max.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è maggiore di [{3}] 10 | default.invalid.min.size.message=La proprietà [{0}] della classe [{1}] con valore [{2}] è minore di [{3}] 11 | default.invalid.validator.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è valida 12 | default.not.inlist.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non è contenuta nella lista [{3}] 13 | default.blank.message=La proprietà [{0}] della classe [{1}] non può essere vuota 14 | default.not.equal.message=La proprietà [{0}] della classe [{1}] con valore [{2}] non può essere uguale a [{3}] 15 | default.null.message=La proprietà [{0}] della classe [{1}] non può essere null 16 | default.not.unique.message=La proprietà [{0}] della classe [{1}] con valore [{2}] deve essere unica 17 | 18 | default.paginate.prev=Precedente 19 | default.paginate.next=Successivo 20 | default.boolean.true=Vero 21 | default.boolean.false=Falso 22 | default.date.format=dd/MM/yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} creato 26 | default.updated.message={0} {1} aggiornato 27 | default.deleted.message={0} {1} eliminato 28 | default.not.deleted.message={0} {1} non può essere eliminato 29 | default.not.found.message={0} non trovato con id {1} 30 | default.optimistic.locking.failure=Un altro utente ha aggiornato questo {0} mentre si era in modifica 31 | 32 | default.home.label=Home 33 | default.list.label={0} Elenco 34 | default.add.label=Aggiungi {0} 35 | default.new.label=Nuovo {0} 36 | default.create.label=Crea {0} 37 | default.show.label=Mostra {0} 38 | default.edit.label=Modifica {0} 39 | 40 | default.button.create.label=Crea 41 | default.button.edit.label=Modifica 42 | default.button.update.label=Aggiorna 43 | default.button.delete.label=Elimina 44 | default.button.delete.confirm.message=Si è sicuri? 45 | 46 | # Data binding errors. Usa "typeMismatch.$className.$propertyName per la personalizzazione (es typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=La proprietà {0} deve essere un URL valido 48 | typeMismatch.java.net.URI=La proprietà {0} deve essere un URI valido 49 | typeMismatch.java.util.Date=La proprietà {0} deve essere una data valida 50 | typeMismatch.java.lang.Double=La proprietà {0} deve essere un numero valido 51 | typeMismatch.java.lang.Integer=La proprietà {0} deve essere un numero valido 52 | typeMismatch.java.lang.Long=La proprietà {0} deve essere un numero valido 53 | typeMismatch.java.lang.Short=La proprietà {0} deve essere un numero valido 54 | typeMismatch.java.math.BigDecimal=La proprietà {0} deve essere un numero valido 55 | typeMismatch.java.math.BigInteger=La proprietà {0} deve essere un numero valido 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_ja.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、[{3}]パターンと一致していません。 2 | default.invalid.url.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、有効なURLではありません。 3 | default.invalid.creditCard.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、有効なクレジットカード番号ではありません。 4 | default.invalid.email.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、有効なメールアドレスではありません。 5 | default.invalid.range.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、[{3}]から[{4}]範囲内を指定してください。 6 | default.invalid.size.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、[{3}]から[{4}]以内を指定してください。 7 | default.invalid.max.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、最大値[{3}]より大きいです。 8 | default.invalid.min.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、最小値[{3}]より小さいです。 9 | default.invalid.max.size.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、最大値[{3}]より大きいです。 10 | default.invalid.min.size.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、最小値[{3}]より小さいです。 11 | default.invalid.validator.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、カスタムバリデーションを通過できません。 12 | default.not.inlist.message=クラス[{1}]プロパティ[{0}]の値[{2}]は、[{3}]リスト内に存在しません。 13 | default.blank.message=[{1}]クラスのプロパティ[{0}]の空白は許可されません。 14 | default.not.equal.message=クラス[{1}]プロパティ[{0}]の値[{2}]に[{3}]は許可されません。 15 | default.null.message=[{1}]クラスのプロパティ[{0}]にnullは許可されません。 16 | default.not.unique.message=クラス[{1}]プロパティ[{0}]の値[{2}]は既に使用されています。 17 | 18 | default.paginate.prev=戻る 19 | default.paginate.next=次へ 20 | default.boolean.true=はい 21 | default.boolean.false=いいえ 22 | default.date.format=yyyy/MM/dd HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0}(id:{1})を作成しました。 26 | default.updated.message={0}(id:{1})を更新しました。 27 | default.deleted.message={0}(id:{1})を削除しました。 28 | default.not.deleted.message={0}(id:{1})は削除できませんでした。 29 | default.not.found.message={0}(id:{1})は見つかりませんでした。 30 | default.optimistic.locking.failure=この{0}は編集中に他のユーザによって先に更新されています。 31 | 32 | default.home.label=ホーム 33 | default.list.label={0}リスト 34 | default.add.label={0}を追加 35 | default.new.label={0}を新規作成 36 | default.create.label={0}を作成 37 | default.show.label={0}詳細 38 | default.edit.label={0}を編集 39 | 40 | default.button.create.label=作成 41 | default.button.edit.label=編集 42 | default.button.update.label=更新 43 | default.button.delete.label=削除 44 | default.button.delete.confirm.message=本当に削除してよろしいですか? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL={0}は有効なURLでなければなりません。 48 | typeMismatch.java.net.URI={0}は有効なURIでなければなりません。 49 | typeMismatch.java.util.Date={0}は有効な日付でなければなりません。 50 | typeMismatch.java.lang.Double={0}は有効な数値でなければなりません。 51 | typeMismatch.java.lang.Integer={0}は有効な数値でなければなりません。 52 | typeMismatch.java.lang.Long={0}は有効な数値でなければなりません。 53 | typeMismatch.java.lang.Short={0}は有効な数値でなければなりません。 54 | typeMismatch.java.math.BigDecimal={0}は有効な数値でなければなりません。 55 | typeMismatch.java.math.BigInteger={0}は有効な数値でなければなりません。 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_nb.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] overholder ikke mønsteret [{3}] 2 | default.invalid.url.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er ikke en gyldig URL 3 | default.invalid.creditCard.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er ikke et gyldig kredittkortnummer 4 | default.invalid.email.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er ikke en gyldig epostadresse 5 | default.invalid.range.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er ikke innenfor intervallet [{3}] til [{4}] 6 | default.invalid.size.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er ikke innenfor intervallet [{3}] til [{4}] 7 | default.invalid.max.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] overstiger maksimumsverdien på [{3}] 8 | default.invalid.min.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er under minimumsverdien på [{3}] 9 | default.invalid.max.size.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] overstiger maksimumslengden på [{3}] 10 | default.invalid.min.size.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] er kortere enn minimumslengden på [{3}] 11 | default.invalid.validator.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] overholder ikke den brukerdefinerte valideringen 12 | default.not.inlist.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] finnes ikke i listen [{3}] 13 | default.blank.message=Feltet [{0}] i klassen [{1}] kan ikke være tom 14 | default.not.equal.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] kan ikke være [{3}] 15 | default.null.message=Feltet [{0}] i klassen [{1}] kan ikke være null 16 | default.not.unique.message=Feltet [{0}] i klassen [{1}] med verdien [{2}] må være unik 17 | 18 | default.paginate.prev=Forrige 19 | default.paginate.next=Neste 20 | default.boolean.true=Ja 21 | default.boolean.false=Nei 22 | default.date.format=dd.MM.yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} opprettet 26 | default.updated.message={0} {1} oppdatert 27 | default.deleted.message={0} {1} slettet 28 | default.not.deleted.message={0} {1} kunne ikke slettes 29 | default.not.found.message={0} med id {1} ble ikke funnet 30 | default.optimistic.locking.failure=En annen bruker har oppdatert denne {0} mens du redigerte 31 | 32 | default.home.label=Hjem 33 | default.list.label={0}liste 34 | default.add.label=Legg til {0} 35 | default.new.label=Ny {0} 36 | default.create.label=Opprett {0} 37 | default.show.label=Vis {0} 38 | default.edit.label=Endre {0} 39 | 40 | default.button.create.label=Opprett 41 | default.button.edit.label=Endre 42 | default.button.update.label=Oppdater 43 | default.button.delete.label=Slett 44 | default.button.delete.confirm.message=Er du sikker? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Feltet {0} må være en gyldig URL 48 | typeMismatch.java.net.URI=Feltet {0} må være en gyldig URI 49 | typeMismatch.java.util.Date=Feltet {0} må være en gyldig dato 50 | typeMismatch.java.lang.Double=Feltet {0} må være et gyldig tall 51 | typeMismatch.java.lang.Integer=Feltet {0} må være et gyldig heltall 52 | typeMismatch.java.lang.Long=Feltet {0} må være et gyldig heltall 53 | typeMismatch.java.lang.Short=Feltet {0} må være et gyldig heltall 54 | typeMismatch.java.math.BigDecimal=Feltet {0} må være et gyldig tall 55 | typeMismatch.java.math.BigInteger=Feltet {0} må være et gyldig heltall 56 | 57 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_nl.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] komt niet overeen met het vereiste patroon [{3}] 2 | default.invalid.url.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldige URL 3 | default.invalid.creditCard.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldig credit card nummer 4 | default.invalid.email.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is geen geldig e-mailadres 5 | default.invalid.range.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] valt niet in de geldige waardenreeks van [{3}] tot [{4}] 6 | default.invalid.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] valt niet in de geldige grootte van [{3}] tot [{4}] 7 | default.invalid.max.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] overschrijdt de maximumwaarde [{3}] 8 | default.invalid.min.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is minder dan de minimumwaarde [{3}] 9 | default.invalid.max.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] overschrijdt de maximumgrootte van [{3}] 10 | default.invalid.min.size.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is minder dan minimumgrootte van [{3}] 11 | default.invalid.validator.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] is niet geldig 12 | default.not.inlist.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] komt niet voor in de lijst [{3}] 13 | default.blank.message=Attribuut [{0}] van entiteit [{1}] mag niet leeg zijn 14 | default.not.equal.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] mag niet gelijk zijn aan [{3}] 15 | default.null.message=Attribuut [{0}] van entiteit [{1}] mag niet leeg zijn 16 | default.not.unique.message=Attribuut [{0}] van entiteit [{1}] met waarde [{2}] moet uniek zijn 17 | 18 | default.paginate.prev=Vorige 19 | default.paginate.next=Volgende 20 | default.boolean.true=Ja 21 | default.boolean.false=Nee 22 | default.date.format=dd-MM-yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} ingevoerd 26 | default.updated.message={0} {1} gewijzigd 27 | default.deleted.message={0} {1} verwijderd 28 | default.not.deleted.message={0} {1} kon niet worden verwijderd 29 | default.not.found.message={0} met id {1} kon niet worden gevonden 30 | default.optimistic.locking.failure=Een andere gebruiker heeft deze {0} al gewijzigd 31 | 32 | default.home.label=Home 33 | default.list.label={0} Overzicht 34 | default.add.label=Toevoegen {0} 35 | default.new.label=Invoeren {0} 36 | default.create.label=Invoeren {0} 37 | default.show.label=Details {0} 38 | default.edit.label=Wijzigen {0} 39 | 40 | default.button.create.label=Invoeren 41 | default.button.edit.label=Wijzigen 42 | default.button.update.label=Opslaan 43 | default.button.delete.label=Verwijderen 44 | default.button.delete.confirm.message=Weet je het zeker? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Attribuut {0} is geen geldige URL 48 | typeMismatch.java.net.URI=Attribuut {0} is geen geldige URI 49 | typeMismatch.java.util.Date=Attribuut {0} is geen geldige datum 50 | typeMismatch.java.lang.Double=Attribuut {0} is geen geldig nummer 51 | typeMismatch.java.lang.Integer=Attribuut {0} is geen geldig nummer 52 | typeMismatch.java.lang.Long=Attribuut {0} is geen geldig nummer 53 | typeMismatch.java.lang.Short=Attribuut {0} is geen geldig nummer 54 | typeMismatch.java.math.BigDecimal=Attribuut {0} is geen geldig nummer 55 | typeMismatch.java.math.BigInteger=Attribuut {0} is geen geldig nummer 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_pl.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Translated by Matthias Hryniszak - padcom@gmail.com 3 | # 4 | 5 | default.doesnt.match.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie pasuje do wymaganego wzorca [{3}] 6 | default.invalid.url.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] jest niepoprawnym adresem URL 7 | default.invalid.creditCard.message=Właściwość [{0}] klasy [{1}] with value [{2}] nie jest poprawnym numerem karty kredytowej 8 | default.invalid.email.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie jest poprawnym adresem e-mail 9 | default.invalid.range.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie zawiera się zakładanym zakresie od [{3}] do [{4}] 10 | default.invalid.size.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie zawiera się w zakładanym zakresie rozmiarów od [{3}] do [{4}] 11 | default.invalid.max.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] przekracza maksymalną wartość [{3}] 12 | default.invalid.min.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] jest mniejsza niż minimalna wartość [{3}] 13 | default.invalid.max.size.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] przekracza maksymalny rozmiar [{3}] 14 | default.invalid.min.size.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] jest mniejsza niż minimalny rozmiar [{3}] 15 | default.invalid.validator.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie spełnia założonych niestandardowych warunków 16 | default.not.inlist.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie zawiera się w liście [{3}] 17 | default.blank.message=Właściwość [{0}] klasy [{1}] nie może być pusta 18 | default.not.equal.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] nie może równać się [{3}] 19 | default.null.message=Właściwość [{0}] klasy [{1}] nie może być null 20 | default.not.unique.message=Właściwość [{0}] klasy [{1}] o wartości [{2}] musi być unikalna 21 | 22 | default.paginate.prev=Poprzedni 23 | default.paginate.next=Następny 24 | default.boolean.true=Prawda 25 | default.boolean.false=Fałsz 26 | default.date.format=yyyy-MM-dd HH:mm:ss z 27 | default.number.format=0 28 | 29 | default.created.message=Utworzono {0} {1} 30 | default.updated.message=Zaktualizowano {0} {1} 31 | default.deleted.message=Usunięto {0} {1} 32 | default.not.deleted.message={0} {1} nie mógł zostać usunięty 33 | default.not.found.message=Nie znaleziono {0} o id {1} 34 | default.optimistic.locking.failure=Inny użytkownik zaktualizował ten obiekt {0} w trakcie twoich zmian 35 | 36 | default.home.label=Strona domowa 37 | default.list.label=Lista {0} 38 | default.add.label=Dodaj {0} 39 | default.new.label=Utwórz {0} 40 | default.create.label=Utwórz {0} 41 | default.show.label=Pokaż {0} 42 | default.edit.label=Edytuj {0} 43 | 44 | default.button.create.label=Utwórz 45 | default.button.edit.label=Edytuj 46 | default.button.update.label=Zaktualizuj 47 | default.button.delete.label=Usuń 48 | default.button.delete.confirm.message=Czy jesteś pewien? 49 | 50 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 51 | typeMismatch.java.net.URL=Właściwość {0} musi być poprawnym adresem URL 52 | typeMismatch.java.net.URI=Właściwość {0} musi być poprawnym adresem URI 53 | typeMismatch.java.util.Date=Właściwość {0} musi być poprawną datą 54 | typeMismatch.java.lang.Double=Właściwość {0} musi być poprawnyą liczbą 55 | typeMismatch.java.lang.Integer=Właściwość {0} musi być poprawnyą liczbą 56 | typeMismatch.java.lang.Long=Właściwość {0} musi być poprawnyą liczbą 57 | typeMismatch.java.lang.Short=Właściwość {0} musi być poprawnyą liczbą 58 | typeMismatch.java.math.BigDecimal=Właściwość {0} musi być poprawnyą liczbą 59 | typeMismatch.java.math.BigInteger=Właściwość {0} musi być poprawnyą liczbą 60 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_pt_BR.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Translated by Lucas Teixeira - lucastex@gmail.com 3 | # 4 | 5 | default.doesnt.match.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atende ao padrão definido [{3}] 6 | default.invalid.url.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é uma URL válida 7 | default.invalid.creditCard.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um número válido de cartão de crédito 8 | default.invalid.email.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um endereço de email válido. 9 | default.invalid.range.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está entre a faixa de valores válida de [{3}] até [{4}] 10 | default.invalid.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está na faixa de tamanho válida de [{3}] até [{4}] 11 | default.invalid.max.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o valor máximo [{3}] 12 | default.invalid.min.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o valor mínimo [{3}] 13 | default.invalid.max.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o tamanho máximo de [{3}] 14 | default.invalid.min.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o tamanho mínimo de [{3}] 15 | default.invalid.validator.message=O campo [{0}] da classe [{1}] com o valor [{2}] não passou na validação 16 | default.not.inlist.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um valor dentre os permitidos na lista [{3}] 17 | default.blank.message=O campo [{0}] da classe [{1}] não pode ficar em branco 18 | default.not.equal.message=O campo [{0}] da classe [{1}] com o valor [{2}] não pode ser igual a [{3}] 19 | default.null.message=O campo [{0}] da classe [{1}] não pode ser vazio 20 | default.not.unique.message=O campo [{0}] da classe [{1}] com o valor [{2}] deve ser único 21 | 22 | default.paginate.prev=Anterior 23 | default.paginate.next=Próximo 24 | default.boolean.true=Sim 25 | default.boolean.false=Não 26 | default.date.format=dd/MM/yyyy HH:mm:ss z 27 | default.number.format=0 28 | 29 | default.created.message={0} {1} criado 30 | default.updated.message={0} {1} atualizado 31 | default.deleted.message={0} {1} removido 32 | default.not.deleted.message={0} {1} não pode ser removido 33 | default.not.found.message={0} não foi encontrado com o id {1} 34 | default.optimistic.locking.failure=Outro usuário atualizou este [{0}] enquanto você tentou salvá-lo 35 | 36 | default.home.label=Principal 37 | default.list.label={0} Listagem 38 | default.add.label=Adicionar {0} 39 | default.new.label=Novo {0} 40 | default.create.label=Criar {0} 41 | default.show.label=Ver {0} 42 | default.edit.label=Editar {0} 43 | 44 | default.button.create.label=Criar 45 | default.button.edit.label=Editar 46 | default.button.update.label=Alterar 47 | default.button.delete.label=Remover 48 | default.button.delete.confirm.message=Tem certeza? 49 | 50 | # Mensagens de erro em atribuição de valores. Use "typeMismatch.$className.$propertyName" para customizar (eg typeMismatch.Book.author) 51 | typeMismatch.java.net.URL=O campo {0} deve ser uma URL válida. 52 | typeMismatch.java.net.URI=O campo {0} deve ser uma URI válida. 53 | typeMismatch.java.util.Date=O campo {0} deve ser uma data válida 54 | typeMismatch.java.lang.Double=O campo {0} deve ser um número válido. 55 | typeMismatch.java.lang.Integer=O campo {0} deve ser um número válido. 56 | typeMismatch.java.lang.Long=O campo {0} deve ser um número válido. 57 | typeMismatch.java.lang.Short=O campo {0} deve ser um número válido. 58 | typeMismatch.java.math.BigDecimal=O campo {0} deve ser um número válido. 59 | typeMismatch.java.math.BigInteger=O campo {0} deve ser um número válido. 60 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_pt_PT.properties: -------------------------------------------------------------------------------- 1 | # 2 | # translation by miguel.ping@gmail.com, based on pt_BR translation by Lucas Teixeira - lucastex@gmail.com 3 | # 4 | 5 | default.doesnt.match.message=O campo [{0}] da classe [{1}] com o valor [{2}] não corresponde ao padrão definido [{3}] 6 | default.invalid.url.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um URL válido 7 | default.invalid.creditCard.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um número válido de cartão de crédito 8 | default.invalid.email.message=O campo [{0}] da classe [{1}] com o valor [{2}] não é um endereço de email válido. 9 | default.invalid.range.message=O campo [{0}] da classe [{1}] com o valor [{2}] não está dentro dos limites de valores válidos de [{3}] a [{4}] 10 | default.invalid.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] está fora dos limites de tamanho válido de [{3}] a [{4}] 11 | default.invalid.max.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o valor máximo [{3}] 12 | default.invalid.min.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o valor mínimo [{3}] 13 | default.invalid.max.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] ultrapassa o tamanho máximo de [{3}] 14 | default.invalid.min.size.message=O campo [{0}] da classe [{1}] com o valor [{2}] não atinge o tamanho mínimo de [{3}] 15 | default.invalid.validator.message=O campo [{0}] da classe [{1}] com o valor [{2}] não passou na validação 16 | default.not.inlist.message=O campo [{0}] da classe [{1}] com o valor [{2}] não se encontra nos valores permitidos da lista [{3}] 17 | default.blank.message=O campo [{0}] da classe [{1}] não pode ser vazio 18 | default.not.equal.message=O campo [{0}] da classe [{1}] com o valor [{2}] não pode ser igual a [{3}] 19 | default.null.message=O campo [{0}] da classe [{1}] não pode ser vazio 20 | default.not.unique.message=O campo [{0}] da classe [{1}] com o valor [{2}] deve ser único 21 | 22 | default.paginate.prev=Anterior 23 | default.paginate.next=Próximo 24 | 25 | # Mensagens de erro em atribuição de valores. Use "typeMismatch.$className.$propertyName" para personalizar(eg typeMismatch.Book.author) 26 | typeMismatch.java.net.URL=O campo {0} deve ser um URL válido. 27 | typeMismatch.java.net.URI=O campo {0} deve ser um URI válido. 28 | typeMismatch.java.util.Date=O campo {0} deve ser uma data válida 29 | typeMismatch.java.lang.Double=O campo {0} deve ser um número válido. 30 | typeMismatch.java.lang.Integer=O campo {0} deve ser um número válido. 31 | typeMismatch.java.lang.Long=O campo {0} deve ser um número valido. 32 | typeMismatch.java.lang.Short=O campo {0} deve ser um número válido. 33 | typeMismatch.java.math.BigDecimal=O campo {0} deve ser um número válido. 34 | typeMismatch.java.math.BigInteger=O campo {0} deve ser um número válido. 35 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_ru.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Значение [{2}] поля [{0}] класса [{1}] не соответствует образцу [{3}] 2 | default.invalid.url.message=Значение [{2}] поля [{0}] класса [{1}] не является допустимым URL-адресом 3 | default.invalid.creditCard.message=Значение [{2}] поля [{0}] класса [{1}] не является допустимым номером кредитной карты 4 | default.invalid.email.message=Значение [{2}] поля [{0}] класса [{1}] не является допустимым e-mail адресом 5 | default.invalid.range.message=Значение [{2}] поля [{0}] класса [{1}] не попадает в допустимый интервал от [{3}] до [{4}] 6 | default.invalid.size.message=Размер поля [{0}] класса [{1}] (значение: [{2}]) не попадает в допустимый интервал от [{3}] до [{4}] 7 | default.invalid.max.message=Значение [{2}] поля [{0}] класса [{1}] больше чем максимально допустимое значение [{3}] 8 | default.invalid.min.message=Значение [{2}] поля [{0}] класса [{1}] меньше чем минимально допустимое значение [{3}] 9 | default.invalid.max.size.message=Размер поля [{0}] класса [{1}] (значение: [{2}]) больше чем максимально допустимый размер [{3}] 10 | default.invalid.min.size.message=Размер поля [{0}] класса [{1}] (значение: [{2}]) меньше чем минимально допустимый размер [{3}] 11 | default.invalid.validator.message=Значение [{2}] поля [{0}] класса [{1}] не допустимо 12 | default.not.inlist.message=Значение [{2}] поля [{0}] класса [{1}] не попадает в список допустимых значений [{3}] 13 | default.blank.message=Поле [{0}] класса [{1}] не может быть пустым 14 | default.not.equal.message=Значение [{2}] поля [{0}] класса [{1}] не может быть равно [{3}] 15 | default.null.message=Поле [{0}] класса [{1}] не может иметь значение null 16 | default.not.unique.message=Значение [{2}] поля [{0}] класса [{1}] должно быть уникальным 17 | 18 | default.paginate.prev=Предыдушая страница 19 | default.paginate.next=Следующая страница 20 | 21 | # Ошибки при присвоении данных. Для точной настройки для полей классов используйте 22 | # формат "typeMismatch.$className.$propertyName" (например, typeMismatch.Book.author) 23 | typeMismatch.java.net.URL=Значение поля {0} не является допустимым URL 24 | typeMismatch.java.net.URI=Значение поля {0} не является допустимым URI 25 | typeMismatch.java.util.Date=Значение поля {0} не является допустимой датой 26 | typeMismatch.java.lang.Double=Значение поля {0} не является допустимым числом 27 | typeMismatch.java.lang.Integer=Значение поля {0} не является допустимым числом 28 | typeMismatch.java.lang.Long=Значение поля {0} не является допустимым числом 29 | typeMismatch.java.lang.Short=Значение поля {0} не является допустимым числом 30 | typeMismatch.java.math.BigDecimal=Значение поля {0} не является допустимым числом 31 | typeMismatch.java.math.BigInteger=Значение поля {0} не является допустимым числом 32 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_sk.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nezodpovedá požadovanému formátu [{3}] 2 | default.invalid.url.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je platná URL adresa 3 | default.invalid.creditCard.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je platné číslo kreditnej karty 4 | default.invalid.email.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je platná emailová adresa 5 | default.invalid.range.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je v povolenom rozmedzí od [{3}] do [{4}] 6 | default.invalid.size.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je v povolenom rozmedzí od [{3}] do [{4}] 7 | default.invalid.max.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] prekračuje maximálnu povolenú hodnotu [{3}] 8 | default.invalid.min.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] je menšia ako minimálna povolená hodnota [{3}] 9 | default.invalid.max.size.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] prekračuje maximálnu veľkosť [{3}] 10 | default.invalid.min.size.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] je menšia ako minimálna veľkosť [{3}] 11 | default.invalid.validator.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] neprešla validáciou 12 | default.not.inlist.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nie je obsiahnutá v zozname [{3}] 13 | default.blank.message=Položka [{0}] triedy [{1}] nemôže byť prázdna 14 | default.not.equal.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] nemôže byť rovnaká ako [{3}] 15 | default.null.message=Položka [{0}] triedy [{1}] nemôže byť prázdna 16 | default.not.unique.message=Položka [{0}] triedy [{1}] s hodnotou [{2}] musí byť unikátna 17 | 18 | default.paginate.prev=Predchádzajúce 19 | default.paginate.next=Nasledujúce 20 | default.boolean.true=Pravda 21 | default.boolean.false=Nepravda 22 | default.date.format=dd. MM. yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} vytvorené 26 | default.updated.message={0} {1} aktualizované 27 | default.deleted.message={0} {1} vymazané 28 | default.not.deleted.message={0} {1} nemožno zmazať 29 | default.not.found.message={0} nenájdené s id {1} 30 | default.optimistic.locking.failure=Iný používateľ aktualizoval záznam {0}, práve keď bol vami editovaný 31 | 32 | default.home.label=Domov 33 | default.list.label={0} Zoznam 34 | default.add.label=Pridať {0} 35 | default.new.label=Nový {0} 36 | default.create.label=Vytvoriť {0} 37 | default.show.label=Ukázať {0} 38 | default.edit.label=Editovať {0} 39 | 40 | default.button.create.label=Vytvor 41 | default.button.edit.label=Edituj 42 | default.button.update.label=Aktualizuj 43 | default.button.delete.label=Zmaž 44 | default.button.delete.confirm.message=Ste si istý? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Položka {0} musí byť platná URL adresa 48 | typeMismatch.java.net.URI=Položka {0} musí byť platná URI adresa 49 | typeMismatch.java.util.Date=Položka {0} musí byť platný dátum 50 | typeMismatch.java.lang.Double=Položka {0} musí byť desatinné číslo 51 | typeMismatch.java.lang.Integer=Položka {0} musí byť celé číslo 52 | typeMismatch.java.lang.Long=Položka {0} musí byť celé číslo 53 | typeMismatch.java.lang.Short=Položka {0} musí byť celé číslo 54 | typeMismatch.java.math.BigDecimal=Položka {0} musí byť desatinné číslo 55 | typeMismatch.java.math.BigInteger=Položka {0} musí byť celé číslo 56 | typeMismatch=Položka {0} má nezhodný typ 57 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_sv.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=Attributet [{0}] för klassen [{1}] med värde [{2}] matchar inte mot uttrycket [{3}] 2 | default.invalid.url.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte en giltig URL 3 | default.invalid.creditCard.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte ett giltigt kreditkortsnummer 4 | default.invalid.email.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte en giltig e-postadress 5 | default.invalid.range.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte inom intervallet [{3}] till [{4}] 6 | default.invalid.size.message=Attributet [{0}] för klassen [{1}] med värde [{2}] har en storlek som inte är inom [{3}] till [{4}] 7 | default.invalid.max.message=Attributet [{0}] för klassen [{1}] med värde [{2}] överskrider maxvärdet [{3}] 8 | default.invalid.min.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är mindre än minimivärdet [{3}] 9 | default.invalid.max.size.message=Attributet [{0}] för klassen [{1}] med värde [{2}] överskrider maxstorleken [{3}] 10 | default.invalid.min.size.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är mindre än minimistorleken [{3}] 11 | default.invalid.validator.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte giltigt enligt anpassad regel 12 | default.not.inlist.message=Attributet [{0}] för klassen [{1}] med värde [{2}] är inte giltigt, måste vara ett av [{3}] 13 | default.blank.message=Attributet [{0}] för klassen [{1}] får inte vara tomt 14 | default.not.equal.message=Attributet [{0}] för klassen [{1}] med värde [{2}] får inte vara lika med [{3}] 15 | default.null.message=Attributet [{0}] för klassen [{1}] får inte vara tomt 16 | default.not.unique.message=Attributet [{0}] för klassen [{1}] med värde [{2}] måste vara unikt 17 | 18 | default.paginate.prev=Föregående 19 | default.paginate.next=Nästa 20 | default.boolean.true=Sant 21 | default.boolean.false=Falskt 22 | default.date.format=yyyy-MM-dd HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message={0} {1} skapades 26 | default.updated.message={0} {1} uppdaterades 27 | default.deleted.message={0} {1} borttagen 28 | default.not.deleted.message={0} {1} kunde inte tas bort 29 | default.not.found.message={0} med id {1} kunde inte hittas 30 | default.optimistic.locking.failure=En annan användare har uppdaterat det här {0} objektet medan du redigerade det 31 | 32 | default.home.label=Hem 33 | default.list.label= {0} - Lista 34 | default.add.label=Lägg till {0} 35 | default.new.label=Skapa {0} 36 | default.create.label=Skapa {0} 37 | default.show.label=Visa {0} 38 | default.edit.label=Ändra {0} 39 | 40 | default.button.create.label=Skapa 41 | default.button.edit.label=Ändra 42 | default.button.update.label=Uppdatera 43 | default.button.delete.label=Ta bort 44 | default.button.delete.confirm.message=Är du säker? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=Värdet för {0} måste vara en giltig URL 48 | typeMismatch.java.net.URI=Värdet för {0} måste vara en giltig URI 49 | typeMismatch.java.util.Date=Värdet {0} måste vara ett giltigt datum 50 | typeMismatch.java.lang.Double=Värdet {0} måste vara ett giltigt nummer 51 | typeMismatch.java.lang.Integer=Värdet {0} måste vara ett giltigt heltal 52 | typeMismatch.java.lang.Long=Värdet {0} måste vara ett giltigt heltal 53 | typeMismatch.java.lang.Short=Värdet {0} måste vara ett giltigt heltal 54 | typeMismatch.java.math.BigDecimal=Värdet {0} måste vara ett giltigt nummer 55 | typeMismatch.java.math.BigInteger=Värdet {0} måste vara ett giltigt heltal -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_th.properties: -------------------------------------------------------------------------------- 1 | default.doesnt.match.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูกต้องตามรูปแบบที่กำหนดไว้ใน [{3}] 2 | default.invalid.url.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูกต้องตามรูปแบบ URL 3 | default.invalid.creditCard.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูกต้องตามรูปแบบหมายเลขบัตรเครดิต 4 | default.invalid.email.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ถูกต้องตามรูปแบบอีเมล์ 5 | default.invalid.range.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้มีค่าที่ถูกต้องในช่วงจาก [{3}] ถึง [{4}] 6 | default.invalid.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้มีขนาดที่ถูกต้องในช่วงจาก [{3}] ถึง [{4}] 7 | default.invalid.max.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีค่าเกิดกว่าค่ามากสุด [{3}] 8 | default.invalid.min.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีค่าน้อยกว่าค่าต่ำสุด [{3}] 9 | default.invalid.max.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีขนาดเกินกว่าขนาดมากสุดของ [{3}] 10 | default.invalid.min.size.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] มีขนาดต่ำกว่าขนาดต่ำสุดของ [{3}] 11 | default.invalid.validator.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ผ่านการทวนสอบค่าที่ตั้งขึ้น 12 | default.not.inlist.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่ได้อยู่ในรายการต่อไปนี้ [{3}] 13 | default.blank.message=คุณสมบัติ [{0}] ของคลาส [{1}] ไม่สามารถเป็นค่าว่างได้ 14 | default.not.equal.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] ไม่สามารถเท่ากับ [{3}] ได้ 15 | default.null.message=คุณสมบัติ [{0}] ของคลาส [{1}] ไม่สามารถเป็น null ได้ 16 | default.not.unique.message=คุณสมบัติ [{0}] ของคลาส [{1}] ซึ่งมีค่าเป็น [{2}] จะต้องไม่ซ้ำ (unique) 17 | 18 | default.paginate.prev=ก่อนหน้า 19 | default.paginate.next=ถัดไป 20 | default.boolean.true=จริง 21 | default.boolean.false=เท็จ 22 | default.date.format=dd-MM-yyyy HH:mm:ss z 23 | default.number.format=0 24 | 25 | default.created.message=สร้าง {0} {1} เรียบร้อยแล้ว 26 | default.updated.message=ปรับปรุง {0} {1} เรียบร้อยแล้ว 27 | default.deleted.message=ลบ {0} {1} เรียบร้อยแล้ว 28 | default.not.deleted.message=ไม่สามารถลบ {0} {1} 29 | default.not.found.message=ไม่พบ {0} ด้วย id {1} นี้ 30 | default.optimistic.locking.failure=มีผู้ใช้ท่านอื่นปรับปรุง {0} ขณะที่คุณกำลังแก้ไขข้อมูลอยู่ 31 | 32 | default.home.label=หน้าแรก 33 | default.list.label=รายการ {0} 34 | default.add.label=เพิ่ม {0} 35 | default.new.label=สร้าง {0} ใหม่ 36 | default.create.label=สร้าง {0} 37 | default.show.label=แสดง {0} 38 | default.edit.label=แก้ไข {0} 39 | 40 | default.button.create.label=สร้าง 41 | default.button.edit.label=แก้ไข 42 | default.button.update.label=ปรับปรุง 43 | default.button.delete.label=ลบ 44 | default.button.delete.confirm.message=คุณแน่ใจหรือไม่ ? 45 | 46 | # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 47 | typeMismatch.java.net.URL=คุณสมบัติ '{0}' จะต้องเป็นค่า URL ที่ถูกต้อง 48 | typeMismatch.java.net.URI=คุณสมบัติ '{0}' จะต้องเป็นค่า URI ที่ถูกต้อง 49 | typeMismatch.java.util.Date=คุณสมบัติ '{0}' จะต้องมีค่าเป็นวันที่ 50 | typeMismatch.java.lang.Double=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Double 51 | typeMismatch.java.lang.Integer=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Integer 52 | typeMismatch.java.lang.Long=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Long 53 | typeMismatch.java.lang.Short=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท Short 54 | typeMismatch.java.math.BigDecimal=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท BigDecimal 55 | typeMismatch.java.math.BigInteger=คุณสมบัติ '{0}' จะต้องมีค่าเป็นจำนวนประเภท BigInteger 56 | -------------------------------------------------------------------------------- /example/grails-app/i18n/messages_zh_CN.properties: -------------------------------------------------------------------------------- 1 | default.blank.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u4E0D\u80FD\u4E3A\u7A7A 2 | default.doesnt.match.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0E\u5B9A\u4E49\u7684\u6A21\u5F0F [{3}]\u4E0D\u5339\u914D 3 | default.invalid.creditCard.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684\u4FE1\u7528\u5361\u53F7 4 | default.invalid.email.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u7684\u7535\u5B50\u90AE\u4EF6\u5730\u5740 5 | default.invalid.max.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u6BD4\u6700\u5927\u503C [{3}]\u8FD8\u5927 6 | default.invalid.max.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u6BD4\u6700\u5927\u503C [{3}]\u8FD8\u5927 7 | default.invalid.min.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u6BD4\u6700\u5C0F\u503C [{3}]\u8FD8\u5C0F 8 | default.invalid.min.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u6BD4\u6700\u5C0F\u503C [{3}]\u8FD8\u5C0F 9 | default.invalid.range.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u5728\u5408\u6CD5\u7684\u8303\u56F4\u5185( [{3}] \uFF5E [{4}] ) 10 | default.invalid.size.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u7684\u5927\u5C0F\u4E0D\u5728\u5408\u6CD5\u7684\u8303\u56F4\u5185( [{3}] \uFF5E [{4}] ) 11 | default.invalid.url.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u7684URL 12 | default.invalid.validator.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u672A\u80FD\u901A\u8FC7\u81EA\u5B9A\u4E49\u7684\u9A8C\u8BC1 13 | default.not.equal.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0E[{3}]\u4E0D\u76F8\u7B49 14 | default.not.inlist.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u4E0D\u5728\u5217\u8868\u7684\u53D6\u503C\u8303\u56F4\u5185 15 | default.not.unique.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u7684\u503C[{2}]\u5FC5\u987B\u662F\u552F\u4E00\u7684 16 | default.null.message=[{1}]\u7C7B\u7684\u5C5E\u6027[{0}]\u4E0D\u80FD\u4E3Anull 17 | default.paginate.next=\u4E0B\u9875 18 | default.paginate.prev=\u4E0A\u9875 19 | -------------------------------------------------------------------------------- /example/grails-app/init/example/Application.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import grails.boot.GrailsApp 4 | import grails.boot.config.GrailsAutoConfiguration 5 | 6 | class Application extends GrailsAutoConfiguration { 7 | static void main(String[] args) { 8 | GrailsApp.run(Application, args) 9 | } 10 | } -------------------------------------------------------------------------------- /example/grails-app/init/example/BootStrap.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | class BootStrap { 4 | 5 | def init = { servletContext -> 6 | } 7 | def destroy = { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/grails-app/services/example/PostService.groovy: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import grails.gorm.services.Service 4 | 5 | @Service(Post) 6 | interface PostService { 7 | 8 | Post get(Serializable id) 9 | 10 | List list(Map args) 11 | 12 | Long count() 13 | 14 | void delete(Serializable id) 15 | 16 | Post save(Post post) 17 | 18 | } -------------------------------------------------------------------------------- /example/grails-app/taglib/SimpleTagLib.groovy: -------------------------------------------------------------------------------- 1 | 2 | class SimpleTagLib { 3 | static namespace = "my" 4 | 5 | def dateFormat = { attrs, body -> 6 | out << new java.text.SimpleDateFormat(attrs.format).format(attrs.date) 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /example/grails-app/views/error.gsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 |
  • An error has occurred
  • 19 |
  • Exception: ${exception}
  • 20 |
  • Message: ${message}
  • 21 |
  • Path: ${path}
  • 22 |
23 |
24 |
25 | 26 |
    27 |
  • An error has occurred
  • 28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /example/grails-app/views/index.gsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Welcome to Grails 6 | 7 | 8 | 9 | 27 | 36 | 44 | 45 | 46 | 51 | 52 |
53 |
54 |

Welcome to Grails

55 | 56 |

57 | Congratulations, you have successfully started your first Grails application! At the moment 58 | this is the default page, feel free to modify it to either redirect to a controller or display 59 | whatever content you may choose. Below is a list of controllers that are currently deployed in 60 | this application, click on each to execute its default action: 61 |

62 | 63 | 73 |
74 |
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /example/grails-app/views/layouts/main.gsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <g:layoutTitle default="Grails"/> 8 | 9 | 10 |