My configuration file is application.yml, and the content is as follows:

bizlimit:
  common:
    startTime: 05:00
    endTime: 23:00

Java code:

@Component
public class BizTimeLimitProperties {
    @Value("${bizlimit.common.startTime}")
    private String startTime;
    @Value("${bizlimit.common.endTime}")
    private String endTime;
}

In debug mode, I found that startTime is correct, but endTime is '1380'

Comment From: snicoll

: is interpreted by the yaml processor and there is nothing we can do about that. You need to quote the value to prevent that from happening.