Commit 4b93f469 by jwrwst

注释

parent 70eb2a20
package com.cemarose.mongodb.config; package com.cemarose.mongodb.config;
import com.mongodb.*; import com.mongodb.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.parsing.Location;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.SimpleMongoDbFactory; import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
...@@ -13,8 +10,17 @@ import org.springframework.stereotype.Component; ...@@ -13,8 +10,17 @@ import org.springframework.stereotype.Component;
@Component @Component
@ConfigurationProperties(prefix = "spring.data.mongodb") @ConfigurationProperties(prefix = "spring.data.mongodb")
public class MongoConfig { public class MongoConfig {
/**
* host主机ip
*/
private String host; private String host;
/**
* port端口号
*/
private Integer port; private Integer port;
/**
* mongo地址
*/
private String uri; private String uri;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment