增加项目README.md

This commit is contained in:
罗祥
2019-01-07 17:15:51 +08:00
parent 8716dd8648
commit 161521f8a5
70 changed files with 3835 additions and 51 deletions

View File

@ -10,9 +10,10 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--扫描配置文件-->
<context:property-placeholder location="classpath:mongodb.properties"/>
<!--定义用于访问MongoDB的MongoClient实例-->
<mongo:mongo-client host="${mongo.host}" port="${mongo.port}">
<mongo:client-options
connections-per-host="${mongo.connectionsPerHost}"
@ -24,8 +25,10 @@
/>
</mongo:mongo-client>
<!--定义用于连接到数据库的连接工厂-->
<mongo:db-factory dbname="${mongo.dbname}" mongo-ref="mongoClient"/>
<!--实际操作mongodb的template,在代码中注入-->
<bean id="anotherMongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/>
</bean>