ConfigurationProperties注入静态变量的坑

private static String copyrightYear;

public static String getCopyrightYear() {
    return copyrightYear;
}
//set方法不能带上static
public void setCopyrightYear(String copyrightYear) {
    HaiAnConfig.copyrightYear = copyrightYear;
}
/*
//这样子注入不进
public static void setCopyrightYear(String copyrightYear) {
    HaiAnConfig.copyrightYear = copyrightYear;
}
*/
  1. 小黑说道:

    ...

  2. phisguigo说道:

    what happens when you take viagra Several trials are underway to further evaluate the cardiovascular outcomes of SERMs because beneficial effects on serum lipid levels and decreases in homocysteine levels have been suggested

  3. Agexiadig说道:

    Some doctors recommend that metformin only be used to treat people who are insulin- resistant not all people with PCOS regardless of whether or not they are insulin- resistant real cialis online The results also support the notion that cancer prevention should be tailored to each person, Dr

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注