Skip to content

Generic Editor - Spring YAML Properties Not Support Map Recognition #515

@yl-yue

Description

@yl-yue

@ConfigurationProperties code definition

@ConfigurationProperties(prefix = "justauth")
public class JustAuthProperties {
    private Map<AuthDefaultSource, AuthConfig> type = new HashMap<>();
}

public enum AuthDefaultSource implements AuthSource {
    ALIPAY {
        @Override
        public String authorize() {
            return "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm";
        }

        @Override
        public String accessToken() {
            return "https://openapi.alipay.com/gateway.do";
        }

        @Override
        public String userInfo() {
            return "https://openapi.alipay.com/gateway.do";
        }
    }
}

public class AuthConfig {
    private String clientId;
    private String clientSecret;
}

yml file config

justauth:
  enabled: true
  type:
    ALIPAY:
      client-id: 20210011
      client-secret: MIIEvwIBADANBgkqh

error show

image

expectation

Support Map Recognition Prompt Correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions