YML配置文件:
sys-num:
mymap: "{'a':'aaa','b':'bbb'}"
方法内:
public class learnMap {
@Value("#{${sys-num.mymap}}")
private Map<String, String> numMap;
}
YML配置文件:
schedule:
0 0/1 * * * ?
代码示例:
@Scheduled(cron="${schedule}")
public class learnCron{
...
}