工业级运维app手机api
沈斌
2017-11-02 b0db21cae6416355aef7ebf53c2696283a8bc23e
保存历史数据至mongodb
5 files added
7 files modified
455 ■■■■■ changed files
.idea/artifacts/task_war_exploded.xml 4 ●●● patch | view | raw | blame | history
.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_5_0.xml 13 ●●●●● patch | view | raw | blame | history
.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_0_RELEASE.xml 13 ●●●●● patch | view | raw | blame | history
.idea/libraries/Maven__org_springframework_data_spring_data_mongodb_2_0_0_RELEASE.xml 13 ●●●●● patch | view | raw | blame | history
.idea/workspace.xml 302 ●●●● patch | view | raw | blame | history
pom.xml 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/monitor/listener/TaskListener.java 5 ●●●●● patch | view | raw | blame | history
src/main/resources/application.xml 17 ●●●● patch | view | raw | blame | history
src/main/resources/mongodb-config.properties 16 ●●●●● patch | view | raw | blame | history
src/main/resources/mongodb.xml 41 ●●●●● patch | view | raw | blame | history
src/main/resources/redis.xml 10 ●●●● patch | view | raw | blame | history
task.iml 4 ●●● patch | view | raw | blame | history
.idea/artifacts/task_war_exploded.xml
@@ -59,12 +59,14 @@
          <element id="library" level="project" name="Maven: io.netty:netty-all:4.1.7.Final" />
          <element id="library" level="project" name="Maven: org.springframework.data:spring-data-redis:1.8.7.RELEASE" />
          <element id="library" level="project" name="Maven: org.springframework.data:spring-data-keyvalue:1.2.7.RELEASE" />
          <element id="library" level="project" name="Maven: org.springframework.data:spring-data-commons:1.13.7.RELEASE" />
          <element id="library" level="project" name="Maven: org.springframework:spring-oxm:4.3.11.RELEASE" />
          <element id="library" level="project" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" />
          <element id="library" level="project" name="Maven: redis.clients:jedis:2.9.0" />
          <element id="library" level="project" name="Maven: org.apache.commons:commons-pool2:2.4.2" />
          <element id="library" level="project" name="Maven: org.springframework:spring-test:4.1.6.RELEASE" />
          <element id="library" level="project" name="Maven: org.springframework.data:spring-data-mongodb:2.0.0.RELEASE" />
          <element id="library" level="project" name="Maven: org.springframework.data:spring-data-commons:2.0.0.RELEASE" />
          <element id="library" level="project" name="Maven: org.mongodb:mongo-java-driver:3.5.0" />
        </element>
      </element>
      <element id="directory" name="META-INF">
.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_5_0.xml
New file
@@ -0,0 +1,13 @@
<component name="libraryTable">
  <library name="Maven: org.mongodb:mongo-java-driver:3.5.0">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/org/mongodb/mongo-java-driver/3.5.0/mongo-java-driver-3.5.0.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/org/mongodb/mongo-java-driver/3.5.0/mongo-java-driver-3.5.0-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/org/mongodb/mongo-java-driver/3.5.0/mongo-java-driver-3.5.0-sources.jar!/" />
    </SOURCES>
  </library>
</component>
.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_0_RELEASE.xml
New file
@@ -0,0 +1,13 @@
<component name="libraryTable">
  <library name="Maven: org.springframework.data:spring-data-commons:2.0.0.RELEASE">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.0.0.RELEASE/spring-data-commons-2.0.0.RELEASE.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.0.0.RELEASE/spring-data-commons-2.0.0.RELEASE-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.0.0.RELEASE/spring-data-commons-2.0.0.RELEASE-sources.jar!/" />
    </SOURCES>
  </library>
</component>
.idea/libraries/Maven__org_springframework_data_spring_data_mongodb_2_0_0_RELEASE.xml
New file
@@ -0,0 +1,13 @@
<component name="libraryTable">
  <library name="Maven: org.springframework.data:spring-data-mongodb:2.0.0.RELEASE">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-mongodb/2.0.0.RELEASE/spring-data-mongodb-2.0.0.RELEASE.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-mongodb/2.0.0.RELEASE/spring-data-mongodb-2.0.0.RELEASE-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-mongodb/2.0.0.RELEASE/spring-data-mongodb-2.0.0.RELEASE-sources.jar!/" />
    </SOURCES>
  </library>
</component>
.idea/workspace.xml
@@ -6,9 +6,19 @@
    </artifacts-to-build>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="暂停保存原始数据">
    <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="恢复历史数据">
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_5_0.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_0_RELEASE.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_springframework_data_spring_data_mongodb_2_0_0_RELEASE.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/resources/mongodb-config.properties" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/resources/mongodb.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/artifacts/task_war_exploded.xml" afterPath="$PROJECT_DIR$/.idea/artifacts/task_war_exploded.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" afterPath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/application.xml" afterPath="$PROJECT_DIR$/src/main/resources/application.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/redis.xml" afterPath="$PROJECT_DIR$/src/main/resources/redis.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/task.iml" afterPath="$PROJECT_DIR$/task.iml" />
    </list>
    <ignored path="$PROJECT_DIR$/out/" />
    <ignored path="$PROJECT_DIR$/target/" />
@@ -20,14 +30,31 @@
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="FileEditorManager">
    <leaf>
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="TaskListener.java" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="191">
              <caret line="107" column="41" lean-forward="false" selection-start-line="101" selection-start-column="2" selection-end-line="120" selection-end-column="47" />
            <state relative-caret-position="662">
              <caret line="106" column="58" lean-forward="false" selection-start-line="106" selection-start-column="58" selection-end-line="106" selection-end-column="58" />
              <folding>
                <marker date="1509507771000" expanded="false" signature="3614:3623" ph="&lt;~&gt;" />
                <element signature="imports" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="redis.xml" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/main/resources/redis.xml">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="-141">
              <caret line="8" column="0" lean-forward="true" selection-start-line="8" selection-start-column="0" selection-end-line="9" selection-end-column="88" />
              <folding>
                <element signature="e#804#822#0" expanded="true" />
                <element signature="e#871#889#0" expanded="true" />
                <element signature="e#937#960#0" expanded="true" />
                <element signature="e#1116#1131#0" expanded="true" />
                <element signature="e#1139#1154#0" expanded="true" />
                <element signature="e#1166#1181#0" expanded="true" />
              </folding>
            </state>
          </provider>
@@ -66,6 +93,8 @@
      <find>findAdjustByMac</find>
      <find>RedisUtil</find>
      <find>adjust_key</find>
      <find>mongo-client</find>
      <find>mongo</find>
    </findStrings>
  </component>
  <component name="Git.Settings">
@@ -93,7 +122,6 @@
        <option value="$PROJECT_DIR$/src/main/resources/redis-config.properties" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/util/RedisUtil.java" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/entity/job/Adjust.java" />
        <option value="$PROJECT_DIR$/pom.xml" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/Test.java" />
        <option value="$PROJECT_DIR$/src/test/java/Test.java" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/entity/Sensor.java" />
@@ -104,11 +132,14 @@
        <option value="$PROJECT_DIR$/src/main/resources/rabbitmq.xml" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/quartz/StateCheck.java" />
        <option value="$PROJECT_DIR$/src/main/resources/quartz.xml" />
        <option value="$PROJECT_DIR$/src/main/resources/application.xml" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java" />
        <option value="$PROJECT_DIR$/src/main/resources/mapper/JobDao.xml" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/quartz/StopStateCheck.java" />
        <option value="$PROJECT_DIR$/src/main/resources/alarmLevles.json" />
        <option value="$PROJECT_DIR$/pom.xml" />
        <option value="$PROJECT_DIR$/src/main/resources/mongodb-config.properties" />
        <option value="$PROJECT_DIR$/src/main/resources/application.xml" />
        <option value="$PROJECT_DIR$/src/main/resources/mongodb.xml" />
        <option value="$PROJECT_DIR$/src/main/resources/redis.xml" />
        <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" />
      </list>
@@ -127,11 +158,10 @@
    <option name="FILTER_DEBUG" value="true" />
    <option name="CUSTOM_FILTER" />
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-1920" />
  <component name="ProjectFrameBounds" extendedState="6">
    <option name="y" value="23" />
    <option name="width" value="1920" />
    <option name="height" value="1057" />
    <option name="width" value="1404" />
    <option name="height" value="877" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
  <component name="ProjectView">
@@ -149,7 +179,9 @@
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="PackagesPane" />
      <pane id="Scratches" />
      <pane id="AndroidView" />
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <expand>
@@ -173,32 +205,13 @@
              <item name="task" type="462c0819:PsiDirectoryNode" />
              <item name="src" type="462c0819:PsiDirectoryNode" />
              <item name="main" type="462c0819:PsiDirectoryNode" />
              <item name="java" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="task" type="b2602c69:ProjectViewProjectNode" />
              <item name="task" type="462c0819:PsiDirectoryNode" />
              <item name="src" type="462c0819:PsiDirectoryNode" />
              <item name="main" type="462c0819:PsiDirectoryNode" />
              <item name="java" type="462c0819:PsiDirectoryNode" />
              <item name="monitor" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="task" type="b2602c69:ProjectViewProjectNode" />
              <item name="task" type="462c0819:PsiDirectoryNode" />
              <item name="src" type="462c0819:PsiDirectoryNode" />
              <item name="main" type="462c0819:PsiDirectoryNode" />
              <item name="java" type="462c0819:PsiDirectoryNode" />
              <item name="monitor" type="462c0819:PsiDirectoryNode" />
              <item name="listener" type="462c0819:PsiDirectoryNode" />
              <item name="resources" type="462c0819:PsiDirectoryNode" />
            </path>
          </expand>
          <select />
        </subPane>
      </pane>
      <pane id="Scratches" />
      <pane id="Scope" />
      <pane id="AndroidView" />
      <pane id="PackagesPane" />
    </panes>
  </component>
  <component name="PropertiesComponent">
@@ -450,7 +463,9 @@
      <workItem from="1509419662964" duration="551000" />
      <workItem from="1509421142471" duration="5126000" />
      <workItem from="1509503776436" duration="416000" />
      <workItem from="1509507731791" duration="43000" />
      <workItem from="1509507731791" duration="3149000" />
      <workItem from="1509542138760" duration="1615000" />
      <workItem from="1509568770062" duration="2015000" />
    </task>
    <task id="LOCAL-00001" summary="updates">
      <created>1508484578874</created>
@@ -676,81 +691,61 @@
      <option name="project" value="LOCAL" />
      <updated>1509503829871</updated>
    </task>
    <option name="localTasksCounter" value="33" />
    <task id="LOCAL-00033" summary="暂停保存数据">
      <created>1509507788985</created>
      <option name="number" value="00033" />
      <option name="presentableId" value="LOCAL-00033" />
      <option name="project" value="LOCAL" />
      <updated>1509507788985</updated>
    </task>
    <task id="LOCAL-00034" summary="恢复历史数据">
      <created>1509517348407</created>
      <option name="number" value="00034" />
      <option name="presentableId" value="LOCAL-00034" />
      <option name="project" value="LOCAL" />
      <updated>1509517348407</updated>
    </task>
    <option name="localTasksCounter" value="35" />
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="90169000" />
    <option name="totallyTimeSpent" value="96905000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="-1920" y="23" width="1920" height="1057" extended-state="0" />
    <editor active="true" />
    <frame x="0" y="23" width="1404" height="877" extended-state="6" />
    <layout>
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.51615274" order="8" side_tool="true" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32893288" sideWeight="0.49706313" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7276215" sideWeight="0.48235294" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32952183" sideWeight="0.4838473" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16719915" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.0" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39897698" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.49706313" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.40537083" sideWeight="0.4838473" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.54092073" sideWeight="0.48235294" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23348017" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.49706313" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    </layout>
    <layout-to-restore>
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.51615274" order="8" side_tool="true" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32893288" sideWeight="0.49706313" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.0" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39897698" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.49706313" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7276215" sideWeight="0.48235294" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32992327" sideWeight="0.4838473" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30469897" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="true" content_ui="tabs" />
    </layout-to-restore>
  </component>
  <component name="TypeScriptGeneratedFilesManager">
    <option name="version" value="1" />
@@ -806,7 +801,9 @@
    <MESSAGE value="批量更新,提升性能" />
    <MESSAGE value="代码更新" />
    <MESSAGE value="暂停保存原始数据" />
    <option name="LAST_COMMIT_MESSAGE" value="暂停保存原始数据" />
    <MESSAGE value="暂停保存数据" />
    <MESSAGE value="恢复历史数据" />
    <option name="LAST_COMMIT_MESSAGE" value="恢复历史数据" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
@@ -815,41 +812,6 @@
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/controller/EquController.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="61">
          <caret line="24" column="13" lean-forward="false" selection-start-line="24" selection-start-column="13" selection-end-line="24" selection-end-column="13" />
        </state>
      </provider>
    </entry>
    <entry file="jar://$MAVEN_REPOSITORY$/org/springframework/amqp/spring-amqp/1.6.3.RELEASE/spring-amqp-1.6.3.RELEASE.jar!/org/springframework/amqp/core/MessageListener.class">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="60">
          <caret line="7" column="32" lean-forward="false" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="32" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/service/ApiService.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="95">
          <caret line="17" column="13" lean-forward="true" selection-start-line="17" selection-start-column="4" selection-end-line="17" selection-end-column="13" />
        </state>
      </provider>
    </entry>
    <entry file="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/1.2.39/fastjson-1.2.39.jar!/com/alibaba/fastjson/JSON.class">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="90">
          <caret line="48" column="22" lean-forward="false" selection-start-line="48" selection-start-column="22" selection-end-line="48" selection-end-column="22" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/ApiDao.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="315">
          <caret line="27" column="15" lean-forward="false" selection-start-line="27" selection-start-column="11" selection-end-line="27" selection-end-column="15" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/entity/apientity/Report.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
@@ -1058,13 +1020,6 @@
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/pom.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="3090">
          <caret line="206" column="21" lean-forward="false" selection-start-line="202" selection-start-column="8" selection-end-line="206" selection-end-column="21" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/JobDao.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="105">
@@ -1083,22 +1038,6 @@
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="150">
          <caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/redis.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="195">
          <caret line="13" column="90" lean-forward="false" selection-start-line="13" selection-start-column="90" selection-end-line="13" selection-end-column="90" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/application.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="640">
          <caret line="51" column="35" lean-forward="false" selection-start-line="51" selection-start-column="35" selection-end-line="51" selection-end-column="35" />
          <folding />
        </state>
      </provider>
    </entry>
@@ -1158,12 +1097,83 @@
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/pom.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="115">
          <caret line="220" column="24" lean-forward="false" selection-start-line="220" selection-start-column="21" selection-end-line="220" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/redis.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-141">
          <caret line="8" column="0" lean-forward="true" selection-start-line="8" selection-start-column="0" selection-end-line="9" selection-end-column="88" />
          <folding>
            <element signature="e#804#822#0" expanded="true" />
            <element signature="e#871#889#0" expanded="true" />
            <element signature="e#937#960#0" expanded="true" />
            <element signature="e#1116#1131#0" expanded="true" />
            <element signature="e#1139#1154#0" expanded="true" />
            <element signature="e#1166#1181#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-mongodb/2.0.0.RELEASE/spring-data-mongodb-2.0.0.RELEASE.jar!/org/springframework/data/mongodb/config/spring-mongo-2.0.xsd">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="225">
          <caret line="15" column="35" lean-forward="false" selection-start-line="15" selection-start-column="23" selection-end-line="15" selection-end-column="35" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/application.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="60">
          <caret line="22" column="58" lean-forward="false" selection-start-line="22" selection-start-column="58" selection-end-line="22" selection-end-column="58" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-mongodb/2.0.0.RELEASE/spring-data-mongodb-2.0.0.RELEASE.jar!/org/springframework/data/mongodb/core/MongoTemplate.class">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="463">
          <caret line="166" column="69" lean-forward="false" selection-start-line="166" selection-start-column="57" selection-end-line="166" selection-end-column="69" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/mongodb.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="11" column="84" lean-forward="false" selection-start-line="11" selection-start-column="83" selection-end-line="11" selection-end-column="84" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/redis-config.properties">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/resources/mongodb-config.properties">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="15">
          <caret line="1" column="10" lean-forward="false" selection-start-line="1" selection-start-column="10" selection-end-line="1" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="191">
          <caret line="107" column="41" lean-forward="false" selection-start-line="101" selection-start-column="2" selection-end-line="120" selection-end-column="47" />
        <state relative-caret-position="662">
          <caret line="106" column="58" lean-forward="false" selection-start-line="106" selection-start-column="58" selection-end-line="106" selection-end-column="58" />
          <folding>
            <marker date="1509507771000" expanded="false" signature="3614:3623" ph="&lt;~&gt;" />
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
pom.xml
@@ -15,6 +15,17 @@
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>
    <repositories>
        <repository>
            <id>spring-libs-release</id>
            <name>Spring Releases</name>
            <url>https://repo.spring.io/libs-release</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
@@ -206,6 +217,12 @@
            <version>1.2.39</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-mongodb</artifactId>
            <version>2.0.0.RELEASE</version>
        </dependency>
    </dependencies>
src/main/java/com/moral/monitor/listener/TaskListener.java
@@ -20,6 +20,7 @@
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils;
@@ -45,6 +46,9 @@
    @Resource
    RedisTemplate<String, String> redisTemplate;
    @Resource
    protected MongoTemplate mongoTemplate;
    private Logger logger = LoggerFactory.getLogger(TaskListener.class);
@@ -101,6 +105,7 @@
//        //保存原始数据
//        taskDao.insertTologger(mac, message, getDate());
        mongoTemplate.insert(message, "logger");
        //保存历史记录
        List<History> histories = new ArrayList<History>();
src/main/resources/application.xml
@@ -10,8 +10,20 @@
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    <context:component-scan base-package="com.moral.monitor.controller"/>
    <context:component-scan base-package="com.moral.monitor.service"/>
    <!--<context:component-scan base-package="com.moral.monitor.controller"/>-->
    <!--<context:component-scan base-package="com.moral.monitor.service"/>-->
    <context:component-scan base-package="com.moral.monitor.*"/>
    <bean id="PropertiesConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:log4j.properties</value>
                <value>classpath:redis-config.properties</value>
                <value>classpath:mongodb-config.properties</value>
            </list>
        </property>
    </bean>
    <mvc:annotation-driven>
        <mvc:message-converters register-defaults="true">
@@ -47,6 +59,7 @@
    </bean>-->
    <import resource="redis.xml"/>
    <import resource="mongodb.xml"/>
    <import resource="database.xml"/>
    <import resource="rabbitmq.xml"/>
    <import resource="quartz.xml"/>
src/main/resources/mongodb-config.properties
New file
@@ -0,0 +1,16 @@
#mongodb IP
mongo.host=101.37.22.173
#mongodb端口
mongo.port=27017
#每个主机答应的连接数(每个主机的连接池大小),当连接池被用光时,会被阻塞住 ,默以为10
mongo.connectionsPerHost=8
#当前所有的connection都在使用中,则每个connection上可以有N个线程排队等待
mongo.threadsAllowedToBlockForConnectionMultiplier=4
#在建立(打开)套接字连接时的超时时间(ms),默以为0
mongo.connectTimeout=1000
#被阻塞线程从连接池获取连接的最长等待时间(ms)
mongo.maxWaitTime=1500
#是否维持socket的保活状态
mongo.socketKeepAlive=true
#套接字超时时间;该值会被传递给Socket.setSoTimeout(int)。默以为0(无穷)
mongo.socketTimeout=1500
src/main/resources/mongodb.xml
New file
@@ -0,0 +1,41 @@
<?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"
       xmlns:mongo="http://www.springframework.org/schema/data/mongo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-4.2.xsd
                        http://www.springframework.org/schema/data/mongo
                        http://www.springframework.org/schema/data/mongo/spring-mongo.xsd">
    <!--<context:property-placeholder location="classpath:mongodb-config.properties" />-->
    <mongo:mongo-client id="mongo" host="${mongo.host}" port="${mongo.port}">
        <!-- 一些连接属性的设置 -->
        <mongo:client-options
            connections-per-host="${mongo.connectionsPerHost}"
            threads-allowed-to-block-for-connection-multiplier="${mongo.threadsAllowedToBlockForConnectionMultiplier}"
            connect-timeout="${mongo.connectTimeout}"
            max-wait-time="${mongo.maxWaitTime}"
            socket-keep-alive="${mongo.socketKeepAlive}"
            socket-timeout="${mongo.socketTimeout}"
        />
    </mongo:mongo-client>
    <!--<mongo:db-factory dbname="monitor" mongo-ref="mongo" />-->
    <!-- 用户信息配置 -->
    <!-- <bean id="userCredentials" class="org.springframework.data.authentication.UserCredentials">
        <constructor-arg name="username"  value="userName"/>
        <constructor-arg name="password"  value="password"/>
    </bean> -->
    <!-- MongoTemplate -->
    <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
        <constructor-arg ref="mongo" />
        <constructor-arg name="databaseName" value="monitor" /><!-- 数据库的名称 -->
    </bean>
</beans>
src/main/resources/redis.xml
@@ -2,18 +2,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:cache="http://www.springframework.org/schema/cache"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-4.2.xsd
                        http://www.springframework.org/schema/mvc
                        http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
                        http://www.springframework.org/schema/cache
                        http://www.springframework.org/schema/cache/spring-cache-4.2.xsd">
                        http://www.springframework.org/schema/context/spring-context-4.2.xsd">
    <context:property-placeholder location="classpath:redis-config.properties" />
    <!--<context:property-placeholder location="classpath:redis-config.properties" />-->
    <bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig">
        <property name="maxIdle" value="${redis.maxIdle}" />
task.iml
@@ -112,11 +112,13 @@
    <orderEntry type="library" name="Maven: io.netty:netty-all:4.1.7.Final" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.8.7.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.2.7.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.7.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.11.RELEASE" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
    <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" />
    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.2" level="project" />
    <orderEntry type="library" name="Maven: org.springframework:spring-test:4.1.6.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.0.0.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.0.RELEASE" level="project" />
    <orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.5.0" level="project" />
  </component>
</module>