Created
October 21, 2013 22:29
-
-
Save lazaropj/7092036 to your computer and use it in GitHub Desktop.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.2.xsd"> | |
<context:component-scan base-package="br.com.linkout.crudNosql" /> | |
<bean id="mongo" class="org.springframework.data.mongodb.core.MongoFactoryBean"> | |
<property name="host" | |
value="mongodb://crud_mongo:[email protected]:63287/crud_mongo" /> | |
</bean> | |
<bean id="mongoCredentials" class="org.springframework.data.authentication.UserCredentials"> | |
<constructor-arg name="username" value="lazaropj" /> | |
<constructor-arg name="password" value="hoje2013" /> | |
</bean> | |
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"> | |
<constructor-arg name="mongo" ref="mongo" /> | |
<constructor-arg name="databaseName" value="crud_mongo" /> | |
<constructor-arg name="userCredentials" ref="mongoCredentials" /> | |
</bean> | |
<!-- Use this post processor to translate any MongoExceptions thrown in | |
@Repository annotated classes --> | |
<bean | |
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment