Springboot read configuration file problem

I wrote the following configuration in application.yml:

projectConfig:
    code: 0048

read the configuration in java

@Data
public class ProjectConfig{
    private String code;
}

what happens when printing a code of 48.00 instead of 0048 as originally set?

Mar.07,2021

Destiny should be in your own hands!
in order to avoid ambiguity, can't you honestly put in quotation marks?

projectConfig:
    code: '0048'

determined by yml syntax.
if you write 0048 , it will be parsed into numbers by the yml parser.
then push into your @ Data , it becomes 48.00
agrees with the above statement, and
, which is prone to ambiguity, is suggested to include

in quotation marks.
projectConfig:
    code: '0048'
Menu