1
luodangjia
2025-01-17 edc184bb344c97a1fcb43ac66832919d136dff6a
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
package com.ruoyi.common.swagger.config.properties;
 
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.License;
 
/**
 * Swagger 配置属性
 *
 * @author ruoyi
 */
@ConfigurationProperties(prefix = "springdoc")
public class SpringDocProperties
{
    /**
     * 网关
     */
    private String gatewayUrl;
 
    /**
     * 文档基本信息
     */
    @NestedConfigurationProperty
    private InfoProperties info = new InfoProperties();
 
    /**
     * <p>
     * 文档的基础属性信息
     * </p>
     *
     * @see io.swagger.v3.oas.models.info.Info
     *
     * 为了 springboot 自动生产配置提示信息,所以这里复制一个类出来
     */
    public static class InfoProperties
    {
        /**
         * 标题
         */
        private String title = null;
 
        /**
         * 描述
         */
        private String description = null;
 
        /**
         * 联系人信息
         */
        @NestedConfigurationProperty
        private Contact contact = null;
 
        /**
         * 许可证
         */
        @NestedConfigurationProperty
        private License license = null;
 
        /**
         * 版本
         */
        private String version = null;
 
        public String getTitle()
        {
            return title;
        }
 
        public void setTitle(String title)
        {
            this.title = title;
        }
 
        public String getDescription()
        {
            return description;
        }
 
        public void setDescription(String description)
        {
            this.description = description;
        }
 
        public Contact getContact()
        {
            return contact;
        }
 
        public void setContact(Contact contact)
        {
            this.contact = contact;
        }
 
        public License getLicense()
        {
            return license;
        }
 
        public void setLicense(License license)
        {
            this.license = license;
        }
 
        public String getVersion()
        {
            return version;
        }
 
        public void setVersion(String version)
        {
            this.version = version;
        }
    }
 
    public String getGatewayUrl()
    {
        return gatewayUrl;
    }
 
    public void setGatewayUrl(String gatewayUrl)
    {
        this.gatewayUrl = gatewayUrl;
    }
 
    public InfoProperties getInfo()
    {
        return info;
    }
 
    public void setInfo(InfoProperties info)
    {
        this.info = info;
    }
}