File tree Expand file tree Collapse file tree 4 files changed +102
-1
lines changed
api-boot-sample-mongo-client-settings
java/org/minbox/framework/api/boot/sample/mongo/setting Expand file tree Collapse file tree 4 files changed +102
-1
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <parent >
6+ <artifactId >api-boot-samples</artifactId >
7+ <groupId >org.minbox.framework</groupId >
8+ <version >${revision} </version >
9+ </parent >
10+ <modelVersion >4.0.0</modelVersion >
11+
12+ <artifactId >api-boot-sample-mongo-client-settings</artifactId >
13+ <dependencies >
14+ <dependency >
15+ <groupId >org.springframework.boot</groupId >
16+ <artifactId >spring-boot-starter-web</artifactId >
17+ </dependency >
18+ <dependency >
19+ <groupId >org.springframework.boot</groupId >
20+ <artifactId >spring-boot-starter-data-mongodb</artifactId >
21+ </dependency >
22+ <dependency >
23+ <groupId >org.minbox.framework</groupId >
24+ <artifactId >api-boot-starter-mongo-client-settings</artifactId >
25+ </dependency >
26+ </dependencies >
27+ <dependencyManagement >
28+ <dependencies >
29+ <dependency >
30+ <groupId >org.minbox.framework</groupId >
31+ <artifactId >api-boot-dependencies</artifactId >
32+ <scope >import</scope >
33+ <type >pom</type >
34+ <version >2.2.7-SNAPSHOT</version >
35+ </dependency >
36+ </dependencies >
37+ </dependencyManagement >
38+ </project >
Original file line number Diff line number Diff line change 1+ package org .minbox .framework .api .boot .sample .mongo .setting ;
2+
3+ import org .slf4j .Logger ;
4+ import org .slf4j .LoggerFactory ;
5+ import org .springframework .boot .SpringApplication ;
6+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
7+
8+ /**
9+ * "api-boot-starter-mongo-client-settings" 依赖测试启动入口
10+ *
11+ * @author 恒宇少年
12+ */
13+ @ SpringBootApplication
14+ public class ApiBootMongoClientSettingsApplication {
15+ /**
16+ * logger instance
17+ */
18+ static Logger logger = LoggerFactory .getLogger (ApiBootMongoClientSettingsApplication .class );
19+
20+ public static void main (String [] args ) {
21+ SpringApplication .run (ApiBootMongoClientSettingsApplication .class , args );
22+ logger .info ("Mongo扩展参数示例服务启动成功." );
23+ }
24+ }
Original file line number Diff line number Diff line change 1+ spring :
2+ data :
3+ mongodb :
4+ uri : mongodb://username:password@xx.xx.xx.x:27017/db?authSource=admin&connectTimeoutMS=30000&socketTimeoutMS=30000&serverSelectionTimeoutMS=30000
5+ api :
6+ boot :
7+ mongo :
8+ settings :
9+ connection-pool :
10+ max-size : 200
11+ min-size : 10
12+ max-wait-time-milli-seconds : 120000
13+ max-connection-life-time-milli-seconds : 10000
14+ max-connection-idle-time-milli-seconds : 10000
15+ maintenance-frequency-milli-seconds : 360000
16+ maintenance-initial-delay-milli-seconds : 10000
17+ server :
18+ min-heartbeat-frequency-milli-seconds : 600
19+ heartbeat-frequency-milli-seconds : 20000
20+ cluster :
21+ local-threshold-milli-seconds : 20
22+ required-cluster-type : unknown
23+ server-selection-timeout-milli-seconds : 50000
24+ required-replica-set-name : xxx
25+ mode : single
26+ # ssl:
27+ # enabled: true
28+ # invalid-host-name-allowed: true
29+ socket :
30+ connect-timeout-milli-seconds : 20000
31+ read-timeout-milli-seconds : 10000
32+ receive-buffer-size : 1
33+ send-buffer-size : 1
34+ heartbeat-socket :
35+ connect-timeout-milli-seconds : 20000
36+ read-timeout-milli-seconds : 10000
37+ receive-buffer-size : 1
38+ send-buffer-size : 1
Original file line number Diff line number Diff line change 1616 <!-- 跳过deploy-->
1717 <maven .deploy.skip>true</maven .deploy.skip>
1818 <!-- Samples所使用的ApiBoot版本-->
19- <api-boot .version>2.2.5 .RELEASE</api-boot .version>
19+ <api-boot .version>2.2.6 .RELEASE</api-boot .version>
2020 <!-- Samples所使用的SpringBoot版本-->
2121 <spring-boot .version>2.2.6.RELEASE</spring-boot .version>
2222 </properties >
4141 <module >api-boot-sample-logging</module >
4242 <module >api-boot-sample-logging-admin</module >
4343 <module >api-boot-sample-sequence</module >
44+ <module >api-boot-sample-mongo-client-settings</module >
4445 </modules >
4546</project >
You can’t perform that action at this time.
0 commit comments