This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface WebFlowScope { | |
| static final Map scopeMap = new HashMap(); | |
| Object getAttribute(Object key); | |
| default public Object put(Object key, Object val) { | |
| scopeMap.put(key, val); | |
| return getAttribute(key); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Grab("io.ratpack:ratpack-rx:0.9.1") | |
| import ratpack.launch.* | |
| import ratpack.rx.internal.* | |
| def cfg = LaunchConfigBuilder.baseDir(new File("/tmp")).build() | |
| def rx = new DefaultRxBackground(cfg.background) | |
| def list = ['fee', 'fie', 'fo', 'fum'] | |
| def str = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def forkTests = System.properties['grails.project.fork.test'] ? Boolean.getBoolean("grails.project.fork.test") : true | |
| grails.project.fork = [ | |
| test: forkTests ? [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 768, daemon: true] : false, | |
| run: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 768, forkReserve: false], | |
| war: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 768, forkReserve: false], | |
| console: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 768] | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| maven { url 'http://repo.grails.org/grails/repo' } | |
| } | |
| dependencies { | |
| classpath "org.grails:grails-gradle-plugin:2.0.0-SNAPSHOT" | |
| } | |
| } | |
| repositories { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'groovy' | |
| apply plugin: 'idea' | |
| repositories { | |
| flatDir { dirs 'lib' } | |
| maven { url "https://maven.java.net/content/repositories/releases" } | |
| mavenCentral() | |
| } | |
| sourceCompatibility = '1.8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Main { | |
| static void main(args) { | |
| def glassfish = new GlassFishProperties().with { | |
| setPort "http-listener", 8080 | |
| GlassFishRuntime.bootstrap().newGlassFish(it).with { | |
| start() | |
| it | |
| } | |
| } | |
| glassfish.commandRunner.run "deploy", args?.getAt(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.danveloper.springboot | |
| import org.springframework.beans.factory.annotation.Autowired | |
| import org.springframework.boot.SpringApplication | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration | |
| import org.springframework.context.ApplicationContext | |
| import org.springframework.context.annotation.Bean | |
| import org.springframework.context.annotation.Configuration | |
| import org.springframework.integration.dsl.groovy.IntegrationContext | |
| import org.springframework.integration.dsl.groovy.builder.AbstractIntegrationBuilderModuleSupport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CountdownTagLib { | |
| static namespace = "ct" | |
| def down = { args -> | |
| out << """ | |
| <span id='conf-countdown'></span> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-countdown/1.6.1/jquery.countdown.min.js"></script> | |
| <script> | |
| (function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package groovy.runtime.metaclass.java.lang | |
| import groovy.json.JsonSlurper | |
| class StringMixins { | |
| // Must be static & must take an instance of the receiver as the first vararg | |
| static def toJson(String input) { | |
| new JsonSlurper().parseText(input) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.objectpartners.groovy.ext; | |
| // imports... | |
| class MixinResolvingMetaClass extends MetaClassImpl { | |
| static final Map<Class, Class> cachedMixins = new ConcurrentHashMap<>(); | |
| MixinResolvingMetaClass(MetaClassRegistry registry, Class theClass) { | |
| super(registry, theClass); | |
| } |