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
holdqv / mybatis-date
Last active Apr 3, 2018
mybatis-date
View mybatis-date
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@holdqv
holdqv / beanCopy.java
Created Jul 10, 2017
java/groovy bean copy
View beanCopy.java
@CompileStatic
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)
source.properties.each { key, value ->
@holdqv
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 com.sun.org.apache.xml.internal.utils.StopParseException
import java.lang.reflect.UndeclaredThrowableException
class ThirdException extends Exception {
public ThirdException(String msg) {
super(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
@CompileStatic
@ActiveProfiles(value = "testing")
@ContextConfiguration(loader = SpringBootContextLoader, classes = [InvestmentApplication])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@holdqv
holdqv / uuid_grails.md
Last active Dec 21, 2016
gails id use uuid
View uuid_grails.md
class User {

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

    static mapping = {
        id generator:'assigned'
    }
}
@holdqv
holdqv / export.md
Last active Dec 21, 2016
grails 导出 excel
View export.md

引入插件

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 
	target/
	*.releaseBackup

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