1.路径

作者: 盗生一 | 来源:发表于2020-12-14 18:55 被阅读0次
    gat1400:
      # 本系统唯一编号
      deviceId: 123
      faceConfig:
        faceUsername: admin
        facePassword: admin
        faceUrl: http://localhost:9000
      vehicleConfig:
        vehicleUsername: test
        vehiclePassword: test
        vehicleUrl: http://localhost:9001
    
    # 自定义系统相关配置
    sys:
      config-root-path: 'classpath:'
      #swagger设置, 是否开启
      enable-swagger: true
    
    package com.gxhj.safecommunity.gat1400.configuration;
    
    import com.gxhj.core.util.YamlPropertySourceFactory;
    import org.springframework.boot.context.properties.ConfigurationProperties;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.context.annotation.PropertySource;
    
    /**
     * 自定义Bean配置类
     */
    @Configuration
    @ConfigurationProperties("gat1400")
    @PropertySource(value = {"${sys.config-root-path}gat1400.yml"}, factory = YamlPropertySourceFactory.class)
    public class UploadConfig {
        /**
         * User-Identify:使用
         */
        private String deviceId;
    
        /**
         * 人脸数据上传递
         */
        private FaceConfig faceConfig;
    
        /**
         * 车辆抓拍照片上传
         */
        private VehicleConfig vehicleConfig;
    
    
        public VehicleConfig getVehicleConfig() {
            return vehicleConfig;
        }
    
        public void setVehicleConfig(VehicleConfig vehicleConfig) {
            this.vehicleConfig = vehicleConfig;
        }
    
        public String getDeviceId() {
            return deviceId;
        }
    
        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }
    
        public FaceConfig getFaceConfig() {
            return faceConfig;
        }
    
        public void setFaceConfig(FaceConfig faceConfig) {
            this.faceConfig = faceConfig;
        }
    }
    
    
    
    package com.gxhj.safecommunity.gat1400.configuration;
    
    public class FaceConfig {
        /**
         * 用户名
         */
        private String faceUsername;
        /**
         * 密码
         */
        private String facePassword;
    
        /**
         * 人脸上传Url
         */
        private String faceUrl;
    
        public String getFaceUrl() {
            return faceUrl;
        }
    
        public void setFaceUrl(String faceUrl) {
            this.faceUrl = faceUrl;
        }
    
        public String getFaceUsername() {
            return faceUsername;
        }
    
        public void setFaceUsername(String faceUsername) {
            this.faceUsername = faceUsername;
        }
    
        public String getFacePassword() {
            return facePassword;
        }
    
        public void setFacePassword(String facePassword) {
            this.facePassword = facePassword;
        }
    }
    
    

    相关文章

      网友评论

          本文标题:1.路径

          本文链接:https://www.haomeiwen.com/subject/gthbgktx.html