@Value可以使用properties文件中的键值对给变量赋值,只需要用spel表达式在变量上面指定需要的键就可以
换句话说就是可以直接给变量赋值
@Value("张三")
private String name;
@PropertySource指定了读取properties文件的路径,关键字:class path表明了该路径是一个类路径
@scope可以指定一个bean是单例还是多例
@Bean(name = "st")
@Scope("prototype")
public student getStudent()
{
return new student();
}`