package devopsdistilled.operp.server;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import devopsdistilled.operp.server.context.AppContext;

public class ServerApp {

	public static void main(String[] args) {
		ApplicationContext context = new AnnotationConfigApplicationContext(
				AppContext.class);
		System.out.println(context);
	}
}

@@ -32,16 +32,238 @@
 erver;%0A%0A
+import java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0Aimport java.net.URL;%0Aimport java.util.Properties;%0A%0A
 import o
@@ -611,16 +611,830 @@
 class);%0A
+%0A%09%09Properties hibernateProperties = new Properties();%0A%09%09URL hibernatePropertiesFileUrl = ServerApp.class.getClassLoader()%0A%09%09%09%09.getResource(%22server/hibernate.properties%22);%0A%09%09File hibernatePropertiesFile = new File(%0A%09%09%09%09hibernatePropertiesFileUrl.getFile());%0A%09%09try %7B%0A%09%09%09InputStream in = new FileInputStream(hibernatePropertiesFile);%0A%09%09%09hibernateProperties.load(in);%0A%09%09%09String hbm2dllKey = %22hibernate.hbm2ddl.auto%22;%0A%09%09%09String hbm2ddlValue = hibernateProperties.getProperty(hbm2dllKey);%0A%0A%09%09%09if (hbm2ddlValue.equalsIgnoreCase(%22create%22))%0A%09%09%09%09hibernateProperties.setProperty(hbm2dllKey, %22update%22);%0A%0A%09%09%09in.close();%0A%09%09%09OutputStream out = new FileOutputStream(hibernatePropertiesFile);%0A%09%09%09hibernateProperties.store(out, null);%0A%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09System.err.println(%22hibernate.properties file not found!%22);%0A%09%09%7D%0A%0A
 %09%09System

Change hbm2dll property = update after creating schema