Skip to content

Instantly share code, notes, and snippets.

holdq holdqv

Block or report user

Report or block holdqv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
holdqv / mybatis-date
Last active Apr 3, 2018
View mybatis-date
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
holdqv /
Created Jul 10, 2017
java/groovy bean copy
class BeanUtil {
static def copyProperties(source, target) {
this.copyProperties(source, target, [] as String[])
static def copyProperties(source, target, String[] ex) {
def exludeList = ['class', 'metaClass']
exludeList.addAll(ex) { key, value ->
holdqv / test.groovy
Last active Jun 2, 2017
Remove null items from a list in Groovy
View test.groovy
def list = []
class A {
String a
list.add(new A(a: "a"))
list.add(new A(a: "b"))
list.add(new A(a: null))
list.add(new A())
View gist:5a895c984b1286c06fe894f318eb5d39
import java.lang.reflect.UndeclaredThrowableException
class ThirdException extends Exception {
public ThirdException(String msg) {
View mac defualt jdk
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/
export PATH=$JAVA_HOME/bin:$PATH
View gist:3f9d4bd0a9748b647b20a0e25fbd5979
@ActiveProfiles(value = "testing")
@ContextConfiguration(loader = SpringBootContextLoader, classes = [InvestmentApplication])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
holdqv /
Last active Dec 21, 2016
gails id use uuid
class User {

    String id = UUID.randomUUID().toString()

    static mapping = {
        id generator:'assigned'
holdqv /
Last active Dec 21, 2016
grails 导出 excel


compile ":excel-export:0.2.1"


/**     * 导出Excel     * */    
def export(){        
View gist:a971837b190d40a5183087af06f31531

The current .gitignore file content is just like below, and you can add this repo as a upstream **

	## .gitignore for Grails 1.2 and 1.3

	# .gitignore for maven 

	# web application files
You can’t perform that action at this time.