-
-
Save dstarh/910055 to your computer and use it in GitHub Desktop.
This file contains 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 dao = """ | |
package com.activedg.vendor.dao; | |
import org.springframework.stereotype.Repository; | |
import com.activedg.vendor.model.${args[0]}; | |
@Repository | |
public class ${args[0]}Dao extends GenericDAO<${args[0]}, Long> { | |
public ${args[0]}Dao() { | |
super(${args[0]}.class); | |
} | |
} | |
""" | |
def service = """ | |
package com.activedg.vendor.service; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import com.activedg.vendor.dao.${args[0]}Dao; | |
import com.activedg.vendor.model.${args[0]}; | |
@Service | |
public class ${args[0]}Service { | |
@Autowired | |
private ${args[0]}Dao ${args[0]}Dao; | |
public ${args[0]} get(Long id){ | |
return ${args[0]}Dao.get(id); | |
} | |
} | |
""" | |
println dao | |
println '' | |
println '' | |
println service | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment