What if you want to develop Grails 3 projects with Eclipse Mars (4.5) as easy as you did with Groovy/Grails Tool Suite or previous Eclipse versions? Written and tested with Eclipse Mars.1 Release (4.5.1, build 20150924-1200) and Grails 3.1.0 M1.
Sometimes you may need to mock Grails (application) configuration in an unit or integration test. E.g. you want to test code which normally would access the property jmxEnabled from the following configuration block: In Grails 2 in Config.groovy
jmxEnabled = true
or Grails 3 in application.yml
Here’s are the most simple options for a Grails 2.4.x or Grails 3.0.x Spock unit- or integration … Lees verder How to mock configuration in a Grails unit- or integration test?
When working with GORM domain classes and using DetachedCriteria (for example the ‘where’ method on domain classes), you will notice at some point that all joins will be inner joins! If the database setup requires an outer (left) join, then the default GORM api has no way to specify this, so you will need a workaround. This workaround works by … Lees verder Outer joins and domain classes
Since Groovy 1.8 we can check if a Map is equal to another Map if the keys and values are the same. Very convenient in tests for example.
def someMap = [age: 34, name: "Ted"]
assert someMap == [name: "Ted", age: 34]
Today I kept staring at a failure, while testing some x and y graph data points returned by a Grails controller, where two Maps were somehow not equal according to Spock, … Lees verder Grails’ JSONObject.NULL More or Less Equal To Null
Grails 3 has been released with a ton of new features. If you’re used to adding a new Grails distribution in Eclipse or Groovy/Grails Tool Suite, you’ve might have experienced that your good old IDE might not support Grails 3 projects right out of the box. You might be missing: Grails 3 support at all 🙂 Gradle support Groovy 2.4 … Lees verder Grails 3 Released: Installing Gradle and Groovy 2.4 Support in Eclipse/GGTS
Op 26 maart gaf First8 een University sessie met een workshop over Grails. Een introductie door Ted Vinke We startten met een presentatie van Ted Vinke over het framework Grails. Ted vertelde dat Grails gebouwd is op allerlei top Open Source projecten. Hij gaf aan dat Groovy (dynamische taal voor de JVM) en conventie-over-configuratie krachtige hulpmiddelen zijn in het ontwikkelen … Lees verder First8 Grails University sessie een succes
Welcome to the 2nd edition of the First8Friday videoblog, our recurring dose of Open Source inspiration we’d like to share with you the 1st Friday of each month – part of our regular, written articles here on the First8 blog. This episode is again about Grails, one of the more powerful, full-stack webapplication frameworks today. We’ll continue with the spaceships in the scaffolded application … Lees verder First8Friday Editie 2 Grails – Spaceships and constraints
Welcome to the First Edition of the First8Friday videoblog, our recurring dose of Open Source inspiration we’d like to share with you the 1st Friday of each month. Yes, a videoblog – pretty exciting for us since we’ve not yet done this before, but we’re confident it’ll prove an awesome new way of sharing our knowledge with you, together with our … Lees verder First8Friday Editie 1 Grails – Scaffolding a CRUD application
Caches are difficult to get right, and difficult to maintain. To get an insight into how well the Spring method caches we are using actually work, I added some logging. Spring method caches are annotated using ‘Cacheable’. It seemed like a good idea to at least have some information on: how often a cache is hit how long the call … Lees verder Debugging caches using groovy logging
[box type=”shadow”]Or: “getting parallel deployment to work when using EhCache”[/box] Caching During our regular Grails development work, we apply both Hibernate with second level caching and Spring method level caching. They both use EhCache by default. This seems to be the only mature implementation choice for the Grails platform. All this used to work fine (so we thought) until we … Lees verder Fix CacheManager with same name grails-cache-ehcache