spring-config-influxdb.xml 1.43 KB
<?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>