package com.zy.acs.manager.common.config; import com.zy.acs.common.utils.QrCodeCodecSupport; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; import javax.annotation.PostConstruct; @Configuration @ConfigurationProperties(prefix = "agv-codec") public class AgvCodecProperties { private String qrCodeMode = "numeric"; private Integer qrCodeBytes = 4; private Integer qrCodeDisplayLength = 8; private String qrCodeCharset = "ASCII"; @PostConstruct public void init() { QrCodeCodecSupport.configure(qrCodeMode, qrCodeBytes, qrCodeDisplayLength, qrCodeCharset); } public String getQrCodeMode() { return qrCodeMode; } public void setQrCodeMode(String qrCodeMode) { this.qrCodeMode = qrCodeMode; } public Integer getQrCodeBytes() { return qrCodeBytes; } public void setQrCodeBytes(Integer qrCodeBytes) { this.qrCodeBytes = qrCodeBytes; } public Integer getQrCodeDisplayLength() { return qrCodeDisplayLength; } public void setQrCodeDisplayLength(Integer qrCodeDisplayLength) { this.qrCodeDisplayLength = qrCodeDisplayLength; } public String getQrCodeCharset() { return qrCodeCharset; } public void setQrCodeCharset(String qrCodeCharset) { this.qrCodeCharset = qrCodeCharset; } }