-
Notifications
You must be signed in to change notification settings - Fork 0
slask
Keyhan Hadjari edited this page Mar 23, 2017
·
1 revision
To load in a yaml file as in properties:
YamlPropertiesFactoryBean ymlProcessor = new YamlPropertiesFactoryBean();
ymlProcessor.setResources(new ClassPathResource("application.yml"));
Properties props = ymlProcessor.getObject();
To load properties programmitically:
@Autowired
private ApplicationContext context;
ticketUser = context.getEnvironment().getProperty(user);
ticketPass = context.getEnvironment().getProperty(password);