Java Springboot 配置文件说明

2019-03-19  本文已影响0人  MicoCube
@ConfigurationProperties(prefix="acme")
@Validated
public class AcmeProperties {

    @NotNull
    private InetAddress remoteAddress;

    // ... getters and setters

}

You can also trigger validation by annotating the @Bean method that creates the configuration properties with @Validated.

上一篇 下一篇

猜你喜欢

热点阅读