引用yml中自定义数据 静态引用和动态引用

//静态
@Component
public class LinusFile {

    public static String imageUrl;

    @Value("${web.uploadPath}")
    public void setImageUrl(String uploadPath) {
        imageUrl = uploadPath;
    }

  

    //动态
@Value("${web.uploadPath}")
    public String imageUrl;

  

@Componentpublic class LinusFile {

    public static String imageUrl;

    @Value("${web.uploadPath}")    public void setImageUrl(String uploadPath) {        imageUrl = uploadPath;    }
上一篇:Mysql中,书写好的sql提高效率,安全


下一篇:Python dict(或对象)与json之间的互相转化