springboot-获取文本数据
@Component @PropertySource("classpath:my2.properties") @ConfigurationProperties(prefix = "my2") public class MyProperties2 { private int age; private String name; private String email; // 省略 get set public String test() { System.out.print("test"); return "return test"; } @Override public String toString() { return "MyProperties2{" + "age=" + age + ", name='" + name + '\'' + ", email='" + email + '\'' + '}'; } }
今日事今日毕