#
vincentlu
7 天以前 2743d98b983b7ecd049093931749db749b4b2fe4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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;
    }
}