spring-config-influxdb.xml
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:property-placeholder location="classpath:*.properties" />
<context:component-scan base-package="com.monitor" />
<!-- 加载influxdb 配置文件 -->
<bean id="inluxDBSingle" class="com.monitor.influxdb.InluxDBSingle" init-method="init">
<property name="nums">
<value>${influxdb.num}</value>
</property>
<property name="names">
<value>${influxdb.name}</value>
</property>
<property name="ips">
<value>${influxdb.ip}</value>
</property>
<property name="users">
<value>${influxdb.user}</value>
</property>
<property name="pwds">
<value>${influxdb.pwd}</value>
</property>
<property name="connectTimeOut">
<value>${influxdb.connect.timeout}</value>
</property>
<property name="readTimeOut">
<value>${influxdb.read.timeout}</value>
</property>
<property name="writeTimeOut">
<value>${influxdb.write.timeout}</value>
</property>
</bean>
</beans>