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
"/api/${domainInPlural}"(controller: 'apiJsonRest', action:'list') |
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
def user = User.get(params.id) | |
render(contentType:'text/json'){ | |
user{ | |
username(user.username) | |
birthday(user.birthday) | |
firstName(user.firstName) | |
lastName(user.lastName) | |
city(user.city) | |
.... |
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
BarcodeFormat format = BarcodeFormat.valueOf(params.format) | |
File file = File.createTempFile("temp-barcode", "png") | |
barCodeRendererService.renderImageToFile(file, params.data, getSize(params.width), getSize(params.height), format) |
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
import com.google.zxing.MultiFormatWriter | |
import com.google.zxing.client.j2se.MatrixToImageWriter | |
import com.google.zxing.common.BitMatrix | |
import com.google.zxing.BarcodeFormat | |
import com.google.zxing.EncodeHintType | |
/** | |
* @author Michael Astreiko | |
*/ | |
class BarCodeRendererService { |
NewerOlder