2017-04-26 14 views
-1

環境変数 'env'はnullです。どうして?@PropertySourceおよび@Autowired environment - null

import org.springframework.core.env.Environment; 

@Configuration 
@ComponentScan(basePackages = { "src.main.resources" }) 
@PropertySource("classpath:application.properties") 
public class PropertiesUtil { 

@Autowired 
private static Environment env; 

答えて

関連する問題