Last active
September 1, 2015 13:01
-
-
Save qfrank/2d2b59ee3b71255b25d2 to your computer and use it in GitHub Desktop.
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
grails url-mappings-report | |
// test com.xx.PushServiceSpec | |
test-app unit: **.Push* | |
// specify service init non-lazy, just add a static lazyInit property with false | |
static lazyInit = false | |
import org.grails.databinding.converters.ValueConverter | |
import test.Address | |
class AddressValueConverter implements ValueConverter { | |
boolean canConvert(value) { | |
value instanceof String | |
} | |
def convert(value) { | |
def pieces = value.split(':') | |
// uncomment following line will make convert failed..but exception won't display in ide console! | |
// throw new RuntimeException('convert failed') | |
return new Address(city: pieces[0], state: pieces[1]) | |
} | |
Class<?> getTargetType() { | |
Address | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment