Created
June 27, 2012 07:41
-
-
Save enesakar/3002259 to your computer and use it in GitHub Desktop.
main mongo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hazelmongo; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.GenericXmlApplicationContext; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) { | |
ApplicationContext ctx = new GenericXmlApplicationContext("beans.xml"); | |
Map map= (Map)ctx.getBean("usermap"); | |
User usr = new User("Enes", 29); | |
map.put("id-134", usr); | |
User usr2 = (User) map.get("id-134"); | |
System.out.println(usr2.getName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment