Record a small problem, @ Value use of that need attention.

@Value of several uses:

Common attributes:

@Value("${flag}")

public int flag;

Static properties (which can be implanted in the non-static value setter method):

public static int flag;

@Value("${flag}")

public void setFlag(int flag){

this.flag = flag

}

Guess you like

Origin www.cnblogs.com/happyeric/p/11432840.html