Merge branch 'web_backend_develope' of

https://git.trustie.net/fhx569287825/aggregation-platform

Conflicts:
	src/com/platform/controller/DataModelController.java
web_backend_develope
chenlw 9 years ago
commit 172b1b512b

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

@ -0,0 +1,14 @@
!SESSION 2016-09-13 08:39:40.662 -----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
!ENTRY org.eclipse.egit.ui 2 0 2016-09-13 08:40:07.850
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\wuming'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

@ -0,0 +1,2 @@
GitRepositoriesView.GitDirectories=C\:\\Users\\wuming\\workspace\\data_manager_backend\\.git;
eclipse.preferences.version=1

@ -0,0 +1,14 @@
content_assist_proposals_background=255,255,255
content_assist_proposals_foreground=0,0,0
eclipse.preferences.version=1
fontPropagated=true
org.eclipse.jdt.internal.ui.navigator.layout=2
org.eclipse.jdt.ui.editor.tab.width=
org.eclipse.jdt.ui.formatterprofiles.version=12
org.eclipse.jdt.ui.javadoclocations.migrated=true
org.eclipse.jface.textfont=1|Courier New|10.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Courier New;
proposalOrderMigrated=true
spelling_locale_initialized=true
tabWidthPropagated=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.m2e.discovery.pref.projects=

@ -0,0 +1,2 @@
eclipse.preferences.version=1
mylyn.attention.migrated=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true

@ -0,0 +1,3 @@
eclipse.preferences.version=1
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true

@ -0,0 +1,3 @@
activeuserprofiles=DESKTOP-65KJ4BV;Team
eclipse.preferences.version=1
org.eclipse.rse.systemtype.local.systemType.defaultUserId=wuming

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.rse.preferences.order.connections=DESKTOP-65KJ4BV.Local

@ -0,0 +1,2 @@
eclipse.preferences.version=1
pref_first_startup=false

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.team.ui.first_time=false

@ -0,0 +1,2 @@
browsers=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<web-browsers current\="0">\r\n<system/>\r\n<external location\="C\:\\Program Files\\Internet Explorer\\iexplore.exe" name\="Internet Explorer"/>\r\n</web-browsers>
eclipse.preferences.version=1

@ -0,0 +1,5 @@
PROBLEMS_FILTERS_MIGRATE=true
eclipse.preferences.version=1
platformState=1470357608478
quickStart=false
tipsAndTricks=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
showIntro=false

@ -0,0 +1,4 @@
//org.eclipse.ui.commands/state/org.eclipse.wst.xml.views.XPathView.processor.xpathprocessor/org.eclipse.ui.commands.radioState=xpath10
ENABLED_DECORATORS=org.eclipse.jst.ws.jaxws.dom.integration.navigator.WebServiceDecorator\:true,org.eclipse.m2e.core.mavenVersionDecorator\:false,org.eclipse.wst.server.ui.decorator\:false,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.DependencyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ColumnDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ForeignKeyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.IndexTriggerDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.bookmarkDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.FilterNodeDecoration\:true,org.eclipse.datatools.connectivity.ui.decorator.contentextension\:false,org.eclipse.datatools.enablement.ingres.ui.providers.decorators.SynonymDecorationService\:true,org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.ParameterDecorationService\:true,org.eclipse.datatools.enablement.sybase.asa.proxytabledecorator\:true,org.eclipse.datatools.enablement.sybase.ase.webservicetabledecorator\:true,org.eclipse.datatools.enablement.sybase.systemtabledecorator\:true,org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator\:true,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_ejb\:true,org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator\:true,org.eclipse.jst.jee.ui.internal.navigator.ejb.BeanDecorator\:true,org.eclipse.jst.jee.navigator.internal.JEEProjectDecorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_servlet\:true,org.eclipse.m2e.core.maven2decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.rse.core.virtualobject.decorator\:true,org.eclipse.rse.core.binary.executable.decorator\:true,org.eclipse.rse.core.script.executable.decorator\:true,org.eclipse.rse.core.java.executable.decorator\:true,org.eclipse.rse.core.library.decorator\:true,org.eclipse.rse.core.link.decorator\:true,org.eclipse.rse.subsystems.error.decorator\:true,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.SymlinkDecorator\:true,org.eclipse.ui.VirtualResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.eclipse.ui.ResourceFilterDecorator\:false,org.eclipse.wst.jsdt.ui.override.decorator\:true,org.eclipse.wst.server.ui.navigatorDecorator\:true,
PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.m2e.discovery;
eclipse.preferences.version=1

File diff suppressed because it is too large Load Diff

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<typeInfoHistroy/>

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<qualifiedTypeNameHistroy/>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
<item value="2" key="layout"/>
<item value="true" key="group_libraries"/>
<item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;&quot;&gt;&#x0D;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0D;&#x0A;&lt;xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsConnections&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.BinaryProjectFilter1&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.ExternalPluginLibrariesFilter1&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsTempFiles&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;/customFilters&gt;&#x0D;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
<item value="1" key="rootMode"/>
<item value="false" key="linkWithEditor"/>
</section>
</section>

@ -0,0 +1,41 @@
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="org.eclipse.m2e.logback.appender.ConsoleAppenderFilter"/>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
<logger name="com.ning.http.client" level="INFO" />
</configuration>

@ -0,0 +1,57 @@
# RSE DOM Node
00-name=DESKTOP-65KJ4BV\:local.files
01-type=FilterPool
03-attr.default=true
03-attr.deletable=true
03-attr.id=local.files
03-attr.nonRenamable=false
03-attr.owningParentName=null
03-attr.release=200
03-attr.singleFilterStringOnly=false
03-attr.singleFilterStringOnlyESet=false
03-attr.stringsCaseSensitive=true
03-attr.supportsDuplicateFilterStrings=false
03-attr.supportsNestedFilters=true
03-attr.type=default
06-child.00000.00-name=My Home
06-child.00000.01-type=Filter
06-child.00000.03-attr.default=false
06-child.00000.03-attr.filterType=default
06-child.00000.03-attr.id=My Home
06-child.00000.03-attr.nonChangable=false
06-child.00000.03-attr.nonDeletable=false
06-child.00000.03-attr.nonRenamable=false
06-child.00000.03-attr.promptable=false
06-child.00000.03-attr.relativeOrder=0
06-child.00000.03-attr.release=200
06-child.00000.03-attr.singleFilterStringOnly=false
06-child.00000.03-attr.stringsCaseSensitive=false
06-child.00000.03-attr.stringsNonChangable=false
06-child.00000.03-attr.supportsDuplicateFilterStrings=false
06-child.00000.03-attr.supportsNestedFilters=true
06-child.00000.06-child.00000.00-name=C\:\\Users\\wuming\\*
06-child.00000.06-child.00000.01-type=FilterString
06-child.00000.06-child.00000.03-attr.default=false
06-child.00000.06-child.00000.03-attr.string=C\:\\Users\\wuming\\*
06-child.00000.06-child.00000.03-attr.type=default
06-child.00001.00-name=Drives
06-child.00001.01-type=Filter
06-child.00001.03-attr.default=false
06-child.00001.03-attr.filterType=default
06-child.00001.03-attr.id=Drives
06-child.00001.03-attr.nonChangable=false
06-child.00001.03-attr.nonDeletable=false
06-child.00001.03-attr.nonRenamable=false
06-child.00001.03-attr.promptable=false
06-child.00001.03-attr.relativeOrder=0
06-child.00001.03-attr.release=200
06-child.00001.03-attr.singleFilterStringOnly=false
06-child.00001.03-attr.stringsCaseSensitive=false
06-child.00001.03-attr.stringsNonChangable=false
06-child.00001.03-attr.supportsDuplicateFilterStrings=false
06-child.00001.03-attr.supportsNestedFilters=true
06-child.00001.06-child.00000.00-name=*
06-child.00001.06-child.00000.01-type=FilterString
06-child.00001.06-child.00000.03-attr.default=false
06-child.00001.06-child.00000.03-attr.string=*
06-child.00001.06-child.00000.03-attr.type=default

@ -0,0 +1,25 @@
# RSE DOM Node
00-name=Local
01-type=Host
03-attr.description=
03-attr.hostname=LOCALHOST
03-attr.offline=false
03-attr.promptable=false
03-attr.systemType=org.eclipse.rse.systemtype.local
03-attr.type=Local
06-child.00000.00-name=Local Connector Service
06-child.00000.01-type=ConnectorService
06-child.00000.03-attr.group=Local Connector Service
06-child.00000.03-attr.port=0
06-child.00000.03-attr.useSSL=false
06-child.00000.06-child.00000.00-name=Local Files
06-child.00000.06-child.00000.01-type=SubSystem
06-child.00000.06-child.00000.03-attr.hidden=false
06-child.00000.06-child.00000.03-attr.type=local.files
06-child.00000.06-child.00000.06-child.00000.00-name=DESKTOP-65KJ4BV___DESKTOP-65KJ4BV\:local.files
06-child.00000.06-child.00000.06-child.00000.01-type=FilterPoolReference
06-child.00000.06-child.00000.06-child.00000.03-attr.refID=local.files
06-child.00000.06-child.00001.00-name=Local Shells
06-child.00000.06-child.00001.01-type=SubSystem
06-child.00000.06-child.00001.03-attr.hidden=false
06-child.00000.06-child.00001.03-attr.type=local.shells

@ -0,0 +1,7 @@
# RSE DOM Node
00-name=DESKTOP-65KJ4BV
01-type=Profile
03-attr.defaultPrivate=true
03-attr.isActive=true
05-ref.00000=FP.local.files_0
05-ref.00001=H.local_16

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.ui.internal.QuickAccess">
<item value="759" key="dialogHeight"/>
<item value="1440" key="dialogWidth"/>
<list key="textEntries">
</list>
<list key="orderedElements">
</list>
<list key="orderedProviders">
</list>
<list key="textArray">
</list>
</section>
<section name="ShowViewDialog">
<item value="345" key="DIALOG_WIDTH"/>
<item value="1|Microsoft YaHei UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Microsoft YaHei UI" key="DIALOG_FONT_NAME"/>
<item value="org.eclipse.jdt.ui.PackageExplorer" key="ShowViewDialog.STORE_SELECTED_VIEW_ID"/>
<item value="452" key="DIALOG_HEIGHT"/>
<item value="796" key="DIALOG_X_ORIGIN"/>
<item value="227" key="DIALOG_Y_ORIGIN"/>
<list key="ShowViewDialog.STORE_EXPANDED_CATEGORIES_ID">
<item value="org.eclipse.jdt.ui.java"/>
</list>
</section>
<section name="ImportExportAction">
</section>
</section>

@ -0,0 +1 @@
org.eclipse.core.runtime=1

@ -1,5 +1,10 @@
eclipse.preferences.version=1
encoding//WebContent/WEB-INF/config/config.properties=UTF-8
<<<<<<< HEAD
encoding//src/com/platform/controller/DataModelController.java=UTF-8
encoding/<project>=UTF-8
=======
encoding//src/com/platform/utils/GanymedSSH.java=UTF-8
encoding/<project>=UTF-8
separateDerivedEncodings=true
>>>>>>> ef099fd1aed73bcc4ef4c8d62aaba6cc6ec2dabf

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RemoteSystemsTempFiles</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.eclipse.rse.ui.remoteSystemsTempNature</nature>
</natures>
</projectDescription>

@ -1,9 +1,11 @@
<?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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
@ -12,14 +14,24 @@
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
http://www.springframework.org/schema/websocket
http://www.springframework.org/schema/websocket/spring-websocket.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<!-- 读取db.properties中的属性值 -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="WEB-INF/config/config.properties"></property>
</bean>
<bean id="messageCodeResolver"
class="org.springframework.validation.DefaultMessageCodesResolver">
<property name="prefix" value="validation."></property>
</bean>
<!-- 连接MySQL数据库 -->
<bean id="mySQLDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
@ -29,7 +41,7 @@
<property name="password" value="${jdbc.mysql.password}" />
</bean>
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">

@ -1,17 +1,38 @@
<?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-3.0.xsd
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/websocket
http://www.springframework.org/schema/websocket/spring-websocket-4.0.xsd"
default-autowire="byName">
<context:component-scan base-package="com.platform.controller,com.platform.test;" >
<context:component-scan base-package="com.platform.controller,com.platform.test,com.platform.websocket;" >
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
</context:component-scan>
<context:annotation-config />
<mvc:annotation-driven/>
<!-- 用于将对象转换为JSON -->
<bean id="stringConverter"
class="org.springframework.http.converter.StringHttpMessageConverter">

@ -21,6 +21,7 @@
<url-pattern>/</url-pattern>
</filter-mapping>
<!-- spring配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/config/spring-applicationContext.xml</param-value>
@ -46,7 +47,7 @@
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/*</url-pattern>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- log4j配置文件 -->

@ -0,0 +1,28 @@
package com.platform.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.base.BaseController;
@Controller
public class TaskModelController extends BaseController{
@RequestMapping("/task/transfer/list")
@ResponseBody
public List<Integer> getTransferTask(HttpServletRequest res, HttpServletResponse req) {
List<Integer> list = new ArrayList<Integer>();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
return list;
}
}

@ -15,6 +15,7 @@ public class OracleConnectorParams {
public OracleConnectorParams() {
// TODO Auto-generated constructor stub
maybeInit();
}
public OracleConnectorParams(String port, String ip, String name) {
@ -37,9 +38,9 @@ public class OracleConnectorParams {
private void maybeInit() {
Properties properties = ConfigPropertyReader.Builder(
Configs.CONFIG_LOCALTION).getProperties();
this.user = properties.getProperty("collect-user");
this.user = properties.getProperty("collect-user-name");
this.password = properties.getProperty("collect-password");
this.databaseName = properties.getProperty("collect-database");
this.databaseName = properties.getProperty("collect-service-name");
}
public String getPort() {
@ -89,5 +90,4 @@ public class OracleConnectorParams {
public void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
}

@ -6,8 +6,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.validation.constraints.Pattern.Flag;
import com.platform.utils.Configs;
public class OracleConnector {
@ -21,16 +19,15 @@ public class OracleConnector {
}
}
public static Connection ConnectionBuilder(String url, String user,
String password) {
Connection conn = null;
Connection conn=null;
try {
conn = DriverManager.getConnection(url, user, password);
} catch (SQLException e) {
return conn;
Configs.CONSOLE_LOGGER.info("创建oracle连接失败: [" + e.getMessage() + "]");
}
return conn;
}

@ -17,31 +17,20 @@ import com.platform.utils.Configs;
public class OracleStatusService {
private static Map<String, Timer> alliveTask = new Hashtable<String, Timer>();
public final static int EXEC_TIME = 10;// 连接多少次后不成功,取消链接
public final static int EXEC_TIME = 9;// 连接多少次后不成功,取消链接
public final static long INTERVAL_TIME = 60 * 1000;// 每隔多少毫秒执行一次连接任务
public final static long DELAY_TIME = 0; // 延迟多少秒后执行
public final static long DELAY_TIME = 30 * 1000; // 延迟多少秒后执行
public void connectToOracle(String replicasName) {
SimpleKubeClient sKubeClient = new SimpleKubeClient();
ReplicationController replicationController = sKubeClient
.getReplicationController(replicasName);
if (alliveTask.containsKey(replicasName)) {
killAlliveTask(replicasName);
}
if (null != replicationController) {
List<Pod> filterPods = sKubeClient
.getPodsForApplicaList(replicationController);
if (filterPods != null && filterPods.size() > 0) {
Pod pod = filterPods.get(0);
OracleConnectorParams orp = new OracleConnectorParams(
String.valueOf(sKubeClient.getPodContainerport(pod)),
sKubeClient.getPodHostIp(pod), replicasName);
Timer timer = new Timer();
alliveTask.put(replicasName, timer);
timer.schedule(new connectTask(orp, sKubeClient), DELAY_TIME,
INTERVAL_TIME);
}
}
OracleConnectorParams orp = new OracleConnectorParams();
Timer timer = new Timer();
alliveTask.put(replicasName, timer);
timer.schedule(new connectTask(replicasName, orp, sKubeClient), DELAY_TIME,
INTERVAL_TIME);
}
@ -97,6 +86,13 @@ public class OracleStatusService {
private OracleConnectorParams ocp;
private SimpleKubeClient client;
public connectTask(String taskName, OracleConnectorParams ocp, SimpleKubeClient client){
this.taskName = taskName;
this.ocp = ocp;
this.count = 0;
this.client = client;
}
public connectTask(OracleConnectorParams ocp, SimpleKubeClient client) {
this.taskName = ocp.getName();
this.ocp = ocp;
@ -106,32 +102,58 @@ public class OracleStatusService {
@Override
public void run() {
if (count == EXEC_TIME && alliveTask.containsKey(taskName)) {
if (count == EXEC_TIME && alliveTask.containsKey(taskName)) { //如果任务已经执行10次则任务oracle启动失败并取消oracle连接
killAlliveTask(taskName);
client.updateOrAddReplicasLabelById(taskName, "status", "1");
} else {
String url = "jdbc:oracle:thin:@" + ocp.getIp() + ":"
+ ocp.getPort() + "/" + ocp.getDatabaseName();
boolean flag = OracleConnector.canConnect(url, ocp.getUser(),
ocp.getPassword());
String message = "失败";
if (flag && alliveTask.containsKey(taskName)) {
client.updateOrAddReplicasLabelById(taskName, "status", "2");
message = "成功";
killAlliveTask(taskName); // 连接成功,取消连接
client.updateOrAddReplicasLabelById(taskName, "status", "1"); //更新ReplicationController标签将oracle状态标示未1(0:启动中1失败2成功)
Configs.CONSOLE_LOGGER.info("更新replicationController标签 "
+ taskName + "\t[标签更新为: 失败]");
} else { //否则执行连接oracle任务判断oracle是否启动成功
Pod pod = filterPod();
if (pod != null) {
String ip = client.getPodHostIp(pod);
int port = client.getPodContainerport(pod);
if (ip != null && port != 0) {
String url = "jdbc:oracle:thin:@" + ip + ":" + port
+ ":" + ocp.getDatabaseName();
boolean flag = OracleConnector.canConnect(url, //连接结果返回参数true标示连接成功false标示连接失败
ocp.getUser(), ocp.getPassword());
Configs.CONSOLE_LOGGER.info("url:" + url + ",user:"
+ ocp.getUser() + ",password:"
+ ocp.getPassword());
String message = "失败";
if (flag && alliveTask.containsKey(taskName)) {
client.updateOrAddReplicasLabelById(taskName,
"status", "2");
message = "成功";
killAlliveTask(taskName); // 连接成功,取消连接
Configs.CONSOLE_LOGGER
.info("更新replicationController标签 "
+ taskName + "\t[标签更新为: 成功]");
}
Configs.CONSOLE_LOGGER.info("连接到数据库服务: " + taskName
+ "\t[连接结果: " + message + "]");
}
}
Configs.CONSOLE_LOGGER.info("连接到数据库服务: " + taskName
+ "\t[连接结果: " + message + "]");
}
count++;
}
@Override
public boolean cancel() {
System.out.println("aaaaaaa");
if (client != null)
this.client.close();
return super.cancel();
/**
* oracleip
* @return
*/
private Pod filterPod() {
Pod pod = null;
ReplicationController replicationController = client
.getReplicationController(taskName);
if (null != replicationController) {
List<Pod> filterPods = client
.getPodsForApplicaList(replicationController);
if (filterPods != null && filterPods.size() > 0) {
pod = filterPods.get(0);
}
}
return pod;
}
public String getTaskName() {

@ -5,8 +5,6 @@ import java.util.Properties;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import com.platform.service.thread.ThreadMoveData;
public class ConfigsLoader implements ServletContextListener {
private static ConfigPropertyReader cReader = null;

@ -1,4 +1,3 @@
package com.platform.utils;
import java.util.List;

@ -0,0 +1,51 @@
package com.platform.websocket;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;
public class SystemWebSocketHandler implements WebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession arg0, CloseStatus arg1)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public void afterConnectionEstablished(WebSocketSession arg0)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public void handleMessage(WebSocketSession arg0, WebSocketMessage<?> arg1)
throws Exception {
// TODO Auto-generated method stub
TextMessage returnMessage = new TextMessage("received at server");
sendMessageToUsers(returnMessage);
System.out.println("接到请求");
}
@Override
public void handleTransportError(WebSocketSession arg0, Throwable arg1)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public boolean supportsPartialMessages() {
// TODO Auto-generated method stub
return false;
}
public void sendMessageToUsers(TextMessage message) {
}
}

@ -0,0 +1,28 @@
package com.platform.websocket;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.socket.WebSocketHandler;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
@Configuration
@EnableWebMvc
@EnableWebSocket
public class WebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer {
@Override
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
// TODO Auto-generated method stub
registry.addHandler(myHandler(), "/webSocketServer");
}
@Bean
public WebSocketHandler myHandler() {
return new SystemWebSocketHandler();
}
}

@ -21,8 +21,6 @@ public class FolderReader {
childrens.add(children);
}
}
// folderNode = new FolderNode(file.getName(), file.getAbsolutePath(),
// childrens);
}
return folderNode;
}

@ -0,0 +1,29 @@
package com.platform.test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.platform.utils.Configs;
public class TestConnectOralce {
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Configs.CONSOLE_LOGGER.info("Oracle驱动加载成功");
}catch(Exception e){
System.out.println(e);
}
String url = "jdbc:oracle:thin:@192.168.0.110:60758:orcl";
try {
Connection conn = DriverManager.getConnection(url, "system", "oracle");
System.out.println("连接成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Loading…
Cancel
Save