package com.orange;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.servicebroker.model.BrokerApiVersion;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import static org.springframework.cloud.servicebroker.model.BrokerApiVersion.API_VERSION_ANY;

@EnableGlobalMethodSecurity
@SpringBootApplication(scanBasePackages = { "com.orange" })
public class Application {

	public static void main(String[] args) {
		SpringApplication app = new SpringApplication(Application.class);
		Map<String, Object> properties = new HashMap<String, Object>();
		Map<String, String> env = System.getenv();
		String username = env.get("SECURITY_USER");
		String password = env.get("SECURITY_PASSWORD");
		properties.put("security.user.name", username);
		properties.put("security.user.password", password);
		app.setDefaultProperties(properties);
		app.run(args);
//		SpringApplication.run(Application.class, args);
	}
	
	@Bean
	public BrokerApiVersion brokerApiVersion() {
		return new BrokerApiVersion(API_VERSION_ANY);
	}
}
@@ -730,16 +730,309 @@
 class);%0A
+%09%09app.setDefaultProperties(getSecurityProperties());%0A%09%09app.run(args);%0A//%09%09SpringApplication.run(Application.class, args);%0A%09%7D%0A%09%0A%09@Bean%0A%09public BrokerApiVersion brokerApiVersion() %7B%0A%09%09return new BrokerApiVersion(API_VERSION_ANY);%0A%09%7D%0A%09%0A%09public static Map%3CString, Object%3E getSecurityProperties()%7B%0A
 %09%09Map%3CSt
@@ -1340,219 +1340,25 @@
 ;%0A%09%09
-app.setDefaultProperties(properties);%0A%09%09app.run(args);%0A//%09%09SpringApplication.run(Application.class, args);%0A%09%7D%0A%09%0A%09@Bean%0A%09public BrokerApiVersion brokerApiVersion() %7B%0A%09%09return new BrokerApiVersion(API_VERSION_ANY)
+return properties
 ;%0A%09%7D

put the obtention of security properties in a separated func