Merge branch 'web_backend_develope' of

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

Conflicts:
	src/com/base/BaseController.java
	src/com/platform/controller/DataModelController.java
	src/com/platform/service/impl/MoveDataServiceImpl.java
	src/com/platform/service/impl/OracleExtractServiceImpl.java
	src/com/platform/utils/Constant.java
This commit is contained in:
chenlw 2016-09-20 20:45:20 +08:00
commit fead9d9371
38 changed files with 3958 additions and 3947 deletions

View File

@ -1,14 +1,10 @@
<?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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Java"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?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.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

10
.gitignore vendored
View File

@ -1,5 +1,5 @@
/target
/build
/RemoteSystemsTempFiles
/bin/
.settings
/target
/build
/RemoteSystemsTempFiles
/bin/
.settings

View File

@ -1,14 +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.
!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.

View File

@ -1,3 +1,3 @@
#GitProjectData
#Tue Sep 13 08:40:10 CST 2016
.gitdir=../.git
#GitProjectData
#Tue Sep 13 08:40:10 CST 2016
.gitdir=../.git

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -1,10 +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>
<?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>

View File

@ -1,41 +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>
<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>

View File

@ -1,57 +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
# 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

View File

@ -1,25 +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
# 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

View File

@ -1,7 +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
# 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

View File

@ -1,28 +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>
<?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>

View File

@ -1,41 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>data_manager_backend</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>data_manager_backend</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>

View File

@ -1,3 +1,3 @@
Manifest-Version: 1.0
Class-Path:
Manifest-Version: 1.0
Class-Path:

View File

@ -1,50 +1,50 @@
#=============================================================================================================
# MySQL
#=============================================================================================================
# 驱动程序
jdbc.mysql.driver=com.mysql.jdbc.Driver
# 连接url
jdbc.mysql.url=jdbc:mysql://192.168.0.101:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
# 用户名
jdbc.mysql.username=root
# 密码
jdbc.mysql.password=root
#=============================================================================================================
# Oracle 连接配置
#=============================================================================================================
# hui用户名
gather-user-name=system
# 密码
gather-user-password=oracle
#
gather-port=1521
#
gather-service-name=orcl
#=============================================================================================================
# 数据库公共配置
#=============================================================================================================
jdbc.initialSize=5
jdbc.minIdle=5
jdbc.maxIdle=20
jdbc.maxActive=100
jdbc.maxWait=100000
jdbc.defaultAutoCommit=false
jdbc.removeAbandoned=true
jdbc.removeAbandonedTimeout=600
jdbc.testWhileIdle=true
jdbc.timeBetweenEvictionRunsMillis=60000
jdbc.numTestsPerEvictionRun=20
jdbc.minEvictableIdleTimeMillis=300000
#==============================================================================================================
#
#==============================================================================================================
table-suffix=_20152016
extract-log-localtion=/home/log/
gather-tablespace-name=TS_TTSSS
gather-tablespace-path=
gather-table-user-password=
kubeMasterUrl=http://192.168.0.110:8080/
collect-user-name=system
collect-password=oracle
collect-service-name=orcl
#=============================================================================================================
# MySQL
#=============================================================================================================
# 驱动程序
jdbc.mysql.driver=com.mysql.jdbc.Driver
# 连接url
jdbc.mysql.url=jdbc:mysql://192.168.0.101:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
# 用户名
jdbc.mysql.username=root
# 密码
jdbc.mysql.password=root
#=============================================================================================================
# Oracle 连接配置
#=============================================================================================================
# hui用户名
gather-user-name=system
# 密码
gather-user-password=oracle
#
gather-port=1521
#
gather-service-name=orcl
#=============================================================================================================
# 数据库公共配置
#=============================================================================================================
jdbc.initialSize=5
jdbc.minIdle=5
jdbc.maxIdle=20
jdbc.maxActive=100
jdbc.maxWait=100000
jdbc.defaultAutoCommit=false
jdbc.removeAbandoned=true
jdbc.removeAbandonedTimeout=600
jdbc.testWhileIdle=true
jdbc.timeBetweenEvictionRunsMillis=60000
jdbc.numTestsPerEvictionRun=20
jdbc.minEvictableIdleTimeMillis=300000
#==============================================================================================================
#
#==============================================================================================================
table-suffix=_20152016
extract-log-localtion=/home/log/
gather-tablespace-name=TS_TTSSS
gather-tablespace-path=
gather-table-user-password=
kubeMasterUrl=http://192.168.0.110:8080/
collect-user-name=system
collect-password=oracle
collect-service-name=orcl

View File

@ -1,17 +1,17 @@
#!/bin/bash
function ergodic(){
for file in `ls $1`
do
if [ "$file" != "app" -a -d $1"/"$file ]
then
ergodic $1"/"$file
else
local path=$1"/"$file
echo $path
fi
done
}
IFS=$'\n' #这个必须要,否则会在文件名中有空格时出错
INIT_PATH=".";
#!/bin/bash
function ergodic(){
for file in `ls $1`
do
if [ "$file" != "app" -a -d $1"/"$file ]
then
ergodic $1"/"$file
else
local path=$1"/"$file
echo $path
fi
done
}
IFS=$'\n' #这个必须要,否则会在文件名中有空格时出错
INIT_PATH=".";
ergodic $1

View File

@ -1,68 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- 根据需要进行添加 -->
<!-- 输出到控制台 -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="info"></param>
<layout class="org.apache.log4j.TTCCLayout">
<param name="ConversionPattern" value="TTCCLayout"></param>
</layout>
</appender>
<!-- 输出日志到文件 每天一个文件 -->
<appender name="dailyRollingFile" class="org.apache.log4j.DailyRollingFileAppender">
<param name="Threshold" value="info"></param>
<param name="ImmediateFlush" value="true"></param>
<param name="File" value="logs/dailyRollingFile.log"></param>
<param name="DatePattern" value="'.'yyyy-MM-dd'.log'"></param>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"></param>
</layout>
</appender>
<!-- 输出日志到文件 文件大小到达指定尺寸的时候产生一个新的文件 -->
<appender name="railyFile" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="logs/railyFile.log"></param>
<param name="ImmediateFlush" value="true" />
<param name="Threshold" value="info"></param>
<param name="Append" value="true"></param>
<param name="MaxFileSize" value="30KB"></param>
<param name="MaxBackupIndex" value="100"></param>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"></param>
</layout>
</appender>
<logger name="com.ibatis" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.Connection" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.Statement" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.PreparedStatement" additivity="true">
<level value="DEBUG" />
<appender-ref ref="IBatis" />
</logger>
<logger name="java.sql.ResultSet" additivity="true">
<level value="DEBUG" />
<appender-ref ref="IBatis" />
</logger>
<!-- 定义全局的日志输出级别,但是在输出目的地的配置中配置的具体输出级别优先级高于全局定义的优先级。 如果在railyFile中定义<param
name="Threshold" value="info"></param>那么将会把info以上级别的信息输出 -->
<root>
<priority value="debug" />
<appender-ref ref="console" />
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="railyFile" />
<appender-ref ref="file" />
</root>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- 根据需要进行添加 -->
<!-- 输出到控制台 -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="info"></param>
<layout class="org.apache.log4j.TTCCLayout">
<param name="ConversionPattern" value="TTCCLayout"></param>
</layout>
</appender>
<!-- 输出日志到文件 每天一个文件 -->
<appender name="dailyRollingFile" class="org.apache.log4j.DailyRollingFileAppender">
<param name="Threshold" value="info"></param>
<param name="ImmediateFlush" value="true"></param>
<param name="File" value="logs/dailyRollingFile.log"></param>
<param name="DatePattern" value="'.'yyyy-MM-dd'.log'"></param>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"></param>
</layout>
</appender>
<!-- 输出日志到文件 文件大小到达指定尺寸的时候产生一个新的文件 -->
<appender name="railyFile" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="logs/railyFile.log"></param>
<param name="ImmediateFlush" value="true" />
<param name="Threshold" value="info"></param>
<param name="Append" value="true"></param>
<param name="MaxFileSize" value="30KB"></param>
<param name="MaxBackupIndex" value="100"></param>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] {%c:%L}-%m%n"></param>
</layout>
</appender>
<logger name="com.ibatis" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.Connection" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.Statement" additivity="true">
<level value="DEBUG" />
</logger>
<logger name="java.sql.PreparedStatement" additivity="true">
<level value="DEBUG" />
<appender-ref ref="IBatis" />
</logger>
<logger name="java.sql.ResultSet" additivity="true">
<level value="DEBUG" />
<appender-ref ref="IBatis" />
</logger>
<!-- 定义全局的日志输出级别,但是在输出目的地的配置中配置的具体输出级别优先级高于全局定义的优先级。 如果在railyFile中定义<param
name="Threshold" value="info"></param>那么将会把info以上级别的信息输出 -->
<root>
<priority value="debug" />
<appender-ref ref="console" />
<appender-ref ref="dailyRollingFile" />
<appender-ref ref="railyFile" />
<appender-ref ref="file" />
</root>
</log4j:configuration>

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC
"-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias alias="EncodedInfoEntity" type="com.platform.entities.EncodedInfoEntity" />
<typeAlias alias="DataInfoEntity" type="com.platform.entities.DataInfoEntity" />
<typeAlias alias="PagerOptions" type="com.platform.entities.PagerOptions"/>
<typeAlias alias="GatherOracleInfo" type="com.platform.entities.GatherOracleInfo"/>
<typeAlias alias="DataInfoEntityMoveTmp" type="com.platform.entities.DataInfoEntityMoveTmp"/>
<typeAlias alias="SystemEntity" type="com.platform.entities.SystemEntity"/>
<typeAlias alias="RegionalismEntity" type="com.platform.entities.RegionalismEntity"/>
</typeAliases>
<mappers>
<mapper resource="com/dao/mapper/data-details-mapper.xml" />
<mapper resource="com/dao/mapper/config-details-mapper.xml"/>
<mapper resource="com/dao/mapper/dataInfoMoveTmpmapper.xml"/>
<mapper resource="com/dao/mapper/RegionalismMapper.xml"/>
<mapper resource="com/dao/mapper/SystemCodeMapper.xml"/>
</mappers>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC
"-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias alias="EncodedInfoEntity" type="com.platform.entities.EncodedInfoEntity" />
<typeAlias alias="DataInfoEntity" type="com.platform.entities.DataInfoEntity" />
<typeAlias alias="PagerOptions" type="com.platform.entities.PagerOptions"/>
<typeAlias alias="GatherOracleInfo" type="com.platform.entities.GatherOracleInfo"/>
<typeAlias alias="DataInfoEntityMoveTmp" type="com.platform.entities.DataInfoEntityMoveTmp"/>
<typeAlias alias="SystemEntity" type="com.platform.entities.SystemEntity"/>
<typeAlias alias="RegionalismEntity" type="com.platform.entities.RegionalismEntity"/>
</typeAliases>
<mappers>
<mapper resource="com/dao/mapper/data-details-mapper.xml" />
<mapper resource="com/dao/mapper/config-details-mapper.xml"/>
<mapper resource="com/dao/mapper/dataInfoMoveTmpmapper.xml"/>
<mapper resource="com/dao/mapper/RegionalismMapper.xml"/>
<mapper resource="com/dao/mapper/SystemCodeMapper.xml"/>
</mappers>
</configuration>

View File

@ -1,93 +1,93 @@
<?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:context="http://www.springframework.org/schema/context"
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
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
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/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">
<property name="driverClassName" value="${jdbc.mysql.driver}" />
<property name="url" value="${jdbc.mysql.url}" />
<property name="username" value="${jdbc.mysql.username}" />
<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="dataSource" ref="mySQLDataSource" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao,com.dao.mapper" />
</bean>
<!-- 配置声明式事物 事物管理器 -->
<!-- 配置声明式事物 -->
<bean id="mySQLTxManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="mySQLTxManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="select*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.platform.service.*.*(..))"
id="pointcut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut" />
</aop:config>
<!-- 连接oracle数据库 -->
<!-- <bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close"> <property name="driverClassName" value="${jdbc.oracle.driver}"
/> <property name="url" value="${jdbc.oracle.url}" /> <property name="username"
value="${jdbc.oracle.username}" /> <property name="password" value="${jdbc.oracle.password}"
/> <property name="initialSize" value="${jdbc.initialSize}" /> <property
name="minIdle" value="${jdbc.minIdle}" /> <property name="maxIdle" value="${jdbc.maxIdle}"
/> <property name="maxActive" value="${jdbc.maxActive}" /> <property name="maxWait"
value="${jdbc.maxWait}" /> <property name="defaultAutoCommit" value="${jdbc.defaultAutoCommit}"
/> <property name="removeAbandoned" value="${jdbc.removeAbandoned}" /> <property
name="removeAbandonedTimeout" value="${jdbc.removeAbandonedTimeout}" /> <property
name="testWhileIdle" value="${jdbc.testWhileIdle}" /> <property name="timeBetweenEvictionRunsMillis"
value="${jdbc.timeBetweenEvictionRunsMillis}" /> <property name="numTestsPerEvictionRun"
value="${jdbc.numTestsPerEvictionRun}" /> <property name="minEvictableIdleTimeMillis"
value="${jdbc.minEvictableIdleTimeMillis}" /> </bean> -->
<context:component-scan base-package="com.platform.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!-- Enables the Spring Task @Scheduled programming model -->
<task:executor id="executor" pool-size="5" />
<task:scheduler id="scheduler" pool-size="10" />
<task:annotation-driven executor="executor" scheduler="scheduler" />
<?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:context="http://www.springframework.org/schema/context"
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
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
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/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">
<property name="driverClassName" value="${jdbc.mysql.driver}" />
<property name="url" value="${jdbc.mysql.url}" />
<property name="username" value="${jdbc.mysql.username}" />
<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="dataSource" ref="mySQLDataSource" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao,com.dao.mapper" />
</bean>
<!-- 配置声明式事物 事物管理器 -->
<!-- 配置声明式事物 -->
<bean id="mySQLTxManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="mySQLTxManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="select*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.platform.service.*.*(..))"
id="pointcut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut" />
</aop:config>
<!-- 连接oracle数据库 -->
<!-- <bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
destroy-method="close"> <property name="driverClassName" value="${jdbc.oracle.driver}"
/> <property name="url" value="${jdbc.oracle.url}" /> <property name="username"
value="${jdbc.oracle.username}" /> <property name="password" value="${jdbc.oracle.password}"
/> <property name="initialSize" value="${jdbc.initialSize}" /> <property
name="minIdle" value="${jdbc.minIdle}" /> <property name="maxIdle" value="${jdbc.maxIdle}"
/> <property name="maxActive" value="${jdbc.maxActive}" /> <property name="maxWait"
value="${jdbc.maxWait}" /> <property name="defaultAutoCommit" value="${jdbc.defaultAutoCommit}"
/> <property name="removeAbandoned" value="${jdbc.removeAbandoned}" /> <property
name="removeAbandonedTimeout" value="${jdbc.removeAbandonedTimeout}" /> <property
name="testWhileIdle" value="${jdbc.testWhileIdle}" /> <property name="timeBetweenEvictionRunsMillis"
value="${jdbc.timeBetweenEvictionRunsMillis}" /> <property name="numTestsPerEvictionRun"
value="${jdbc.numTestsPerEvictionRun}" /> <property name="minEvictableIdleTimeMillis"
value="${jdbc.minEvictableIdleTimeMillis}" /> </bean> -->
<context:component-scan base-package="com.platform.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!-- Enables the Spring Task @Scheduled programming model -->
<task:executor id="executor" pool-size="5" />
<task:scheduler id="scheduler" pool-size="10" />
<task:annotation-driven executor="executor" scheduler="scheduler" />
</beans>

View File

@ -1,57 +1,57 @@
<?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: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-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,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">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
<value>text/html;charset=UTF-8</value>
</list>
</property>
</bean>
<bean id="jsonConverter"
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="stringConverter" />
<ref bean="jsonConverter" />
</list>
</property>
</bean>
<?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: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-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,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">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
<value>text/html;charset=UTF-8</value>
</list>
</property>
</bean>
<bean id="jsonConverter"
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="stringConverter" />
<ref bean="jsonConverter" />
</list>
</property>
</bean>
</beans>

View File

@ -1,66 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>javaBackend</display-name>
<welcome-file-list>
<welcome-file>/index.html</welcome-file>
</welcome-file-list>
<!-- 设置post请求字符编码:utf-8,get编码设置tomcat -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
<!-- spring配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/config/spring-applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.platform.utils.ConfigsLoader</listener-class>
</listener>
<!-- springmv的配置文件 -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/springmvc-applicationContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- log4j配置文件 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/config/log4j-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<!-- 防止Spring内存溢出监听器 -->
<!-- <listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener> -->
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>javaBackend</display-name>
<welcome-file-list>
<welcome-file>/index.html</welcome-file>
</welcome-file-list>
<!-- 设置post请求字符编码:utf-8,get编码设置tomcat -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
<!-- spring配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/config/spring-applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.platform.utils.ConfigsLoader</listener-class>
</listener>
<!-- springmv的配置文件 -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/springmvc-applicationContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- log4j配置文件 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/config/log4j-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<!-- 防止Spring内存溢出监听器 -->
<!-- <listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener> -->
</web-app>

View File

@ -1,65 +1,65 @@
/**
* 文件名 BaseController.java
* 版权 : XX科技有限公司
* 描述 : <描述>
* 修改时间2016年9月7日
* 修改内容<修改内容>
*/
package com.base;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.platform.utils.Configs;
/**
* <一句话功能简述>
* <功能详细描述>
* @author chen
* @version [版本号2016年9月7日]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
public class BaseController {
/** log4j */
public static Logger log = Logger.getRootLogger();
/**
* <一句话功能简述> 基于@ExceptionHandler异常处理----全局异常处理
* <功能详细描述>
* @param request
* @param ex 异常
* @return
* @see [#方法#成员]
*/
@ExceptionHandler
public Object exp(HttpServletRequest request, HttpServletResponse response,Exception ex) {
System.out.println("URI"+request.getRequestURI());
request.setAttribute("ex", ex);
System.err.println("BaseController --exp ");
// 根据不同错误转向不同页面
if(ex instanceof CustomException) {
CustomException cuse = (CustomException) ex;
Map<String, String> errmsg = new HashMap<>();
errmsg.put("code", cuse.getCode());
errmsg.put("msg", cuse.getMsg());
log.error(cuse.getCode());
response.setStatus(500);
return response;
} else {
//其他错误则 调到指定页面
log.error(Configs.GLOBAL_EXP_NOT_CUSTOM, ex);
response.setStatus(500);
return response;
}
}
/**
* 文件名 BaseController.java
* 版权 : XX科技有限公司
* 描述 : <描述>
* 修改时间2016年9月7日
* 修改内容<修改内容>
*/
package com.base;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.platform.utils.Configs;
/**
* <一句话功能简述>
* <功能详细描述>
* @author chen
* @version [版本号2016年9月7日]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
public class BaseController {
/** log4j */
public static Logger log = Logger.getRootLogger();
/**
* <一句话功能简述> 基于@ExceptionHandler异常处理----全局异常处理
* <功能详细描述>
* @param request
* @param ex 异常
* @return
* @see [#方法#成员]
*/
@ExceptionHandler
public Object exp(HttpServletRequest request, HttpServletResponse response,Exception ex) {
System.out.println("URI"+request.getRequestURI());
request.setAttribute("ex", ex);
System.err.println("BaseController --exp " + ex);
// 根据不同错误转向不同页面
if(ex instanceof CustomException) {
CustomException cuse = (CustomException) ex;
Map<String, String> errmsg = new HashMap<>();
errmsg.put("code", cuse.getCode());
errmsg.put("msg", cuse.getMsg());
log.error(cuse.getCode());
response.setStatus(500);
return response;
} else {
//其他错误则 调到指定页面
log.error(Configs.GLOBAL_EXP_NOT_CUSTOM, ex);
response.setStatus(500);
return response;
}
}
}

View File

@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.base.BaseController;
@ -329,4 +330,15 @@ public class DataModelController extends BaseController{
Map<String, Object> result = codeService.findAll();
return result;
}
@RequestMapping(value = "/oracle/extract/log", method= RequestMethod.POST )
@ResponseBody
public Object getExtractLog(@RequestParam("rcName") String name, HttpServletRequest res, HttpServletResponse req){
log.info("---------/oracle/extract/log-------------------");
StringBuilder sb = new StringBuilder();
sb.append("查看相应日志").append("\n").append("看到了");
Map<String, String> log = new HashMap<>();
log.put(name, sb.toString());
return log;
}
}

View File

@ -1,174 +1,174 @@
package com.platform.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import com.platform.dao.DataInfoDao;
import com.platform.dao.DataInfoMoveTmpDao;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.DataInfoEntityMoveTmp;
import com.platform.entities.FolderNode;
import com.platform.glusterfs.CheckoutMD5;
import com.platform.glusterfs.CopyData;
import com.platform.glusterfs.RemoveData;
import com.platform.glusterfs.ShowData;
import com.platform.service.IMoveDataService;
import com.platform.utils.Bean2MapUtils;
import com.platform.utils.Constant;
import com.platform.utils.DateForm;
@Component
@Service(value = "moveDataService")
public class MoveDataServiceImpl implements IMoveDataService {
@Resource(name = "dataInfoDao")
private DataInfoDao dataInfoDao;
private RemoveData removeservice = new RemoveData();
/**
* 迁移
*/
CopyData copy = new CopyData();
/**
* MD5校验
*/
CheckoutMD5 check = new CheckoutMD5();
@Resource(name = "dataInfoMoveTmpDao")
private DataInfoMoveTmpDao dataInfoMoveTmpDao;
/**
* 查看数据
*/
ShowData show = new ShowData();
@Override
public boolean moveData(List<DataInfoEntity> data, FolderNode node)
throws Exception {
boolean isSuccess = false;
String tailPath = "";
if (null != data) {
// XXX/320198_16/1,or XXX/320122KFQ_15/1 ---> /320198_16/1, or
// /320122KFQ_15/1
List<DataInfoEntityMoveTmp> exist = dataInfoMoveTmpDao.findAll();
List<String> existIds = new ArrayList<String>();
if (null != exist) {
for (DataInfoEntityMoveTmp dataInfoEntityMoveTmp : exist) {
if ("0".equals(dataInfoEntityMoveTmp.getCompleteStatus())
|| "1".equals(dataInfoEntityMoveTmp
.getCompleteStatus())) {
if (null != dataInfoEntityMoveTmp.getDataPath()) {
existIds.add(dataInfoEntityMoveTmp.getDataPath());
}
}
}
}
Pattern pattern = Pattern
.compile("\\/\\d+[a-z]*[A-Z]*_\\d+\\/\\d*\\/*$");
// 末尾 含有 /
Pattern pattern2 = Pattern.compile("\\/$");
String dstPath = node.getPath();
Matcher matcher2 = pattern2.matcher(dstPath);
// 去掉 最后 / 符合
if (matcher2.find()) {
dstPath = dstPath.substring(0, dstPath.length() - 1);
}
List<DataInfoEntityMoveTmp> moveList = new ArrayList<DataInfoEntityMoveTmp>();
for (DataInfoEntity dataInfoEntity : data) {
if (existIds.contains(dataInfoEntity.getDataPath())) {
continue;
}
// TODO 正则取出 data 的后面 路径eg: XXX/320198_16/1,or
// XXX/320122KFQ_15/1
Matcher matcher = pattern.matcher(dataInfoEntity.getDataPath());
// tailPath 第一个字符是 / 符号取尾"\\/\\d+[a-z]*[A-Z]*_\\d+\\/\\d*\\/*$"
if (matcher.find()) {
tailPath = matcher.group();
}
String finalDestPath = dstPath + tailPath;
Matcher matchertmp2 = pattern2.matcher(finalDestPath);
// 去掉 最后 / 符合
if (!matchertmp2.find()) {
finalDestPath = finalDestPath + "/";
}
DataInfoEntityMoveTmp dataMove = new DataInfoEntityMoveTmp();
dataMove.setSystemCode(dataInfoEntity.getSystemCode());
dataMove.setRegionalismCode(dataInfoEntity.getRegionalismCode());
dataMove.setDstPath(finalDestPath);
dataMove.setLastTime(DateForm.date2StringBysecond(new Date()));
dataMove.setFkid(dataInfoEntity.getId());
dataMove.setVolumePath(node.getName());
moveList.add(dataMove);
}
if (moveList.size() > 0) {
dataInfoMoveTmpDao.insertBatch(moveList);
isSuccess = true;
}
}
return isSuccess;
}
@Override
public List<DataInfoEntityMoveTmp> findAll() throws Exception {
List<DataInfoEntityMoveTmp> result = new ArrayList<DataInfoEntityMoveTmp>();
try {
result = dataInfoMoveTmpDao.findAll();
} catch (Exception e) {
System.err.println(e);
}
return result;
}
@Override
public int delete(DataInfoEntityMoveTmp dataMove) throws Exception {
List<DataInfoEntityMoveTmp> list = dataInfoMoveTmpDao.findAll();
if (null != list) {
for (DataInfoEntityMoveTmp dataInfoEntityMoveTmp : list) {
if (dataMove.getId() == dataInfoEntityMoveTmp.getId()) {
dataMove = dataInfoEntityMoveTmp;
break;
}
}
}
if ("3".equals(dataMove.getCompleteStatus())) {
removeservice.deleteFolder(dataMove.getDstPath());
}
int result = 0;
if (!"1".equals(dataMove.getCompleteStatus())) {
result = dataInfoMoveTmpDao.remove(dataMove.getId());
}
return result;
}
@Override
public int save(DataInfoEntityMoveTmp data) throws Exception {
dataInfoMoveTmpDao.save(data);
return 0;
}
@Override
public int insertBatch(List<DataInfoEntityMoveTmp> list) throws Exception {
// TODO Auto-generated method stub
return 0;
}
@Override
public int update(DataInfoEntityMoveTmp data) throws Exception {
int result = dataInfoMoveTmpDao.update(data);
return result;
}
}
package com.platform.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import com.platform.dao.DataInfoDao;
import com.platform.dao.DataInfoMoveTmpDao;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.DataInfoEntityMoveTmp;
import com.platform.entities.FolderNode;
import com.platform.glusterfs.CheckoutMD5;
import com.platform.glusterfs.CopyData;
import com.platform.glusterfs.RemoveData;
import com.platform.glusterfs.ShowData;
import com.platform.service.IMoveDataService;
import com.platform.utils.Bean2MapUtils;
import com.platform.utils.Constant;
import com.platform.utils.DateForm;
@Component
@Service(value = "moveDataService")
public class MoveDataServiceImpl implements IMoveDataService {
@Resource(name = "dataInfoDao")
private DataInfoDao dataInfoDao;
private RemoveData removeservice = new RemoveData();
/**
* 迁移
*/
CopyData copy = new CopyData();
/**
* MD5校验
*/
CheckoutMD5 check = new CheckoutMD5();
@Resource(name = "dataInfoMoveTmpDao")
private DataInfoMoveTmpDao dataInfoMoveTmpDao;
/**
* 查看数据
*/
ShowData show = new ShowData();
@Override
public boolean moveData(List<DataInfoEntity> data, FolderNode node)
throws Exception {
boolean isSuccess = false;
String tailPath = "";
if (null != data) {
// XXX/320198_16/1,or XXX/320122KFQ_15/1 ---> /320198_16/1, or
// /320122KFQ_15/1
List<DataInfoEntityMoveTmp> exist = dataInfoMoveTmpDao.findAll();
List<String> existIds = new ArrayList<String>();
if (null != exist) {
for (DataInfoEntityMoveTmp dataInfoEntityMoveTmp : exist) {
if ("0".equals(dataInfoEntityMoveTmp.getCompleteStatus())
|| "1".equals(dataInfoEntityMoveTmp
.getCompleteStatus())) {
if (null != dataInfoEntityMoveTmp.getDataPath()) {
existIds.add(dataInfoEntityMoveTmp.getDataPath());
}
}
}
}
Pattern pattern = Pattern
.compile("\\/\\d+[a-z]*[A-Z]*_\\d+\\/\\d*\\/*$");
// 末尾 含有 /
Pattern pattern2 = Pattern.compile("\\/$");
String dstPath = node.getPath();
Matcher matcher2 = pattern2.matcher(dstPath);
// 去掉 最后 / 符合
if (matcher2.find()) {
dstPath = dstPath.substring(0, dstPath.length() - 1);
}
List<DataInfoEntityMoveTmp> moveList = new ArrayList<DataInfoEntityMoveTmp>();
for (DataInfoEntity dataInfoEntity : data) {
if (existIds.contains(dataInfoEntity.getDataPath())) {
continue;
}
// TODO 正则取出 data 的后面 路径eg: XXX/320198_16/1,or
// XXX/320122KFQ_15/1
Matcher matcher = pattern.matcher(dataInfoEntity.getDataPath());
// tailPath 第一个字符是 / 符号取尾"\\/\\d+[a-z]*[A-Z]*_\\d+\\/\\d*\\/*$"
if (matcher.find()) {
tailPath = matcher.group();
}
String finalDestPath = dstPath + tailPath;
Matcher matchertmp2 = pattern2.matcher(finalDestPath);
// 去掉 最后 / 符合
if (!matchertmp2.find()) {
finalDestPath = finalDestPath + "/";
}
DataInfoEntityMoveTmp dataMove = new DataInfoEntityMoveTmp();
dataMove.setSystemCode(dataInfoEntity.getSystemCode());
dataMove.setRegionalismCode(dataInfoEntity.getRegionalismCode());
dataMove.setDstPath(finalDestPath);
dataMove.setLastTime(DateForm.date2StringBysecond(new Date()));
dataMove.setFkid(dataInfoEntity.getId());
dataMove.setVolumePath(node.getName());
moveList.add(dataMove);
}
if (moveList.size() > 0) {
dataInfoMoveTmpDao.insertBatch(moveList);
isSuccess = true;
}
}
return isSuccess;
}
@Override
public List<DataInfoEntityMoveTmp> findAll() throws Exception {
List<DataInfoEntityMoveTmp> result = new ArrayList<DataInfoEntityMoveTmp>();
try {
result = dataInfoMoveTmpDao.findAll();
} catch (Exception e) {
System.err.println(e);
}
return result;
}
@Override
public int delete(DataInfoEntityMoveTmp dataMove) throws Exception {
List<DataInfoEntityMoveTmp> list = dataInfoMoveTmpDao.findAll();
if (null != list) {
for (DataInfoEntityMoveTmp dataInfoEntityMoveTmp : list) {
if (dataMove.getId() == dataInfoEntityMoveTmp.getId()) {
dataMove = dataInfoEntityMoveTmp;
break;
}
}
}
if ("3".equals(dataMove.getCompleteStatus())) {
removeservice.deleteFolder(dataMove.getDstPath());
}
int result = 0;
if (!"1".equals(dataMove.getCompleteStatus())) {
result = dataInfoMoveTmpDao.remove(dataMove.getId());
}
return result;
}
@Override
public int save(DataInfoEntityMoveTmp data) throws Exception {
dataInfoMoveTmpDao.save(data);
return 0;
}
@Override
public int insertBatch(List<DataInfoEntityMoveTmp> list) throws Exception {
// TODO Auto-generated method stub
return 0;
}
@Override
public int update(DataInfoEntityMoveTmp data) throws Exception {
int result = dataInfoMoveTmpDao.update(data);
return result;
}
}

View File

@ -1,94 +1,97 @@
package com.platform.service.impl;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.GatherOracleInfo;
import com.platform.entities.OracleConnectorParams;
import com.platform.oracle.OracleConnector;
import com.platform.service.IOracleExtractService;
import com.platform.service.OracleExtractHelper;
import com.platform.utils.Bean2MapUtils;
@Service(value = "OracleExtract")
public class OracleExtractServiceImpl implements IOracleExtractService {
/**
* 抽取
*/
private OracleExtractHelper oracleExtract = new OracleExtractHelper();
/**
* 数据库连接实现类
*/
private OracleConnector connect = new OracleConnector();
@Override
public boolean extractOracle(String name, List<Map<String, String>> dataInfoMap,
Map<String, String> oracleConnect) throws Exception {
boolean isSuccess = false;
try{
//map转 bean(汇总库信息-带tableName的)
GatherOracleInfo oracleModel = (GatherOracleInfo) Bean2MapUtils.convertMap(GatherOracleInfo.class, oracleConnect);
//采集库连接参数
List<OracleConnectorParams> datainfos = new ArrayList<OracleConnectorParams>();
for (Map<String, String> map : dataInfoMap) {
OracleConnectorParams dataInfoEntity = (OracleConnectorParams) Bean2MapUtils.convertMap(OracleConnectorParams.class, oracleConnect);
datainfos.add(dataInfoEntity);
}
Connection conn = OracleConnector.ConnectionBuilder("jdbc:oracle:thin:@" + oracleModel.getIp() + ":" + oracleModel.getPort() + "/"
+ oracleModel.getDatabaseName(), oracleModel.getUser(), oracleModel.getPassword());
for (OracleConnectorParams collectOracle : datainfos) {
oracleExtract.createDBLink(conn, collectOracle);
oracleExtract.createTableSpace(conn, oracleModel);
oracleExtract.createUser(conn, oracleModel);
oracleExtract.extractColleDB(conn, collectOracle);
}
isSuccess = true;
}catch(Exception e){
}
return false;
}
// @Override
// public boolean extractOracle(String name, List<OracleConnectorParams> dataInfos, GatherOracleInfo oracleConnect) throws Exception {
// boolean isSuccess = false;
// try{
// //map转 bean(汇总库信息-带tableName的)
//// GatherOracleInfo oracleModel = (GatherOracleInfo) Bean2MapUtils.convertMap(GatherOracleInfo.class, oracleConnect);
//
// //采集库连接参数
//// List<OracleConnectorParams> datainfos = new ArrayList<OracleConnectorParams>();
//// for (Map<String, String> map : dataInfoMap) {
//// OracleConnectorParams dataInfoEntity = (OracleConnectorParams) Bean2MapUtils.convertMap(OracleConnectorParams.class, oracleConnect);
//// datainfos.add(dataInfoEntity);
//// }
//
// Connection conn = OracleConnector.ConnectionBuilder("jdbc:oracle:thin:@" + oracleConnect.getIp() + ":" + oracleConnect.getPort() + "/"
// + oracleConnect.getDatabaseName(), oracleConnect.getUser(), oracleConnect.getPassword());
//
// for (OracleConnectorParams collectOracle : dataInfos) {
//
// oracleExtract.createDBLink(conn, collectOracle);
// oracleExtract.createTableSpace(conn, oracleConnect);
// oracleExtract.createUser(conn, oracleConnect);
// oracleExtract.extractColleDB(conn, collectOracle);
// }
// isSuccess = true;
// }catch(Exception e){
//
// }
// return false;
// }
}
package com.platform.service.impl;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.platform.entities.GatherOracleInfo;
import com.platform.entities.OracleConnectorParams;
import com.platform.kubernetes.SimpleKubeClient;
import com.platform.oracle.OracleConnector;
import com.platform.service.IOracleExtractService;
import com.platform.service.OracleExtractHelper;
import com.platform.utils.Bean2MapUtils;
@Service(value = "OracleExtract")
public class OracleExtractServiceImpl implements IOracleExtractService {
/**
* kubernetes client
*/
private SimpleKubeClient client = new SimpleKubeClient();
/**
* 抽取
*/
private OracleExtractHelper oracleExtract = new OracleExtractHelper();
/**
* 数据库连接实现类
*/
private OracleConnector connect = new OracleConnector();
@Override
public boolean extractOracle(String name, List<Map<String, String>> dataInfoMap,
Map<String, String> oracleConnect) throws Exception {
boolean isSuccess = false;
try{
//map转 bean(汇总库信息-带tableName的)
GatherOracleInfo oracleModel = (GatherOracleInfo) Bean2MapUtils.convertMap(GatherOracleInfo.class, oracleConnect);
//采集库连接参数
List<OracleConnectorParams> datainfos = new ArrayList<OracleConnectorParams>();
for (Map<String, String> map : dataInfoMap) {
OracleConnectorParams dataInfoEntity = (OracleConnectorParams) Bean2MapUtils.convertMap(OracleConnectorParams.class, oracleConnect);
datainfos.add(dataInfoEntity);
}
Connection conn = OracleConnector.ConnectionBuilder("jdbc:oracle:thin:@" + oracleModel.getIp() + ":" + oracleModel.getPort() + "/"
+ oracleModel.getDatabaseName(), oracleModel.getUser(), oracleModel.getPassword());
for (OracleConnectorParams collectOracle : datainfos) {
client.updateOrAddReplicasLabelById(collectOracle.getName(), "isExtract", "1"); //更新oracle汇总状态0标示为未汇总1标示汇总中2标示汇总完成
oracleExtract.createDBLink(conn, collectOracle); //创建dblink
oracleExtract.createTableSpace(conn, oracleModel); //创建表空间
oracleExtract.createUser(conn, oracleModel);//创建用户并授权
oracleExtract.extractColleDB(conn, collectOracle);//执行抽取
client.updateOrAddReplicasLabelById(collectOracle.getName(), "isExtract", "2"); //更新oracle汇总状态0标示为未汇总1标示汇总中2标示汇总完成
}
isSuccess = true;
}catch(Exception e){
}
return false;
}
// @Override
// public boolean extractOracle(String name, List<OracleConnectorParams> dataInfos, GatherOracleInfo oracleConnect) throws Exception {
// boolean isSuccess = false;
// try{
// //map转 bean(汇总库信息-带tableName的)
//// GatherOracleInfo oracleModel = (GatherOracleInfo) Bean2MapUtils.convertMap(GatherOracleInfo.class, oracleConnect);
//
// //采集库连接参数
//// List<OracleConnectorParams> datainfos = new ArrayList<OracleConnectorParams>();
//// for (Map<String, String> map : dataInfoMap) {
//// OracleConnectorParams dataInfoEntity = (OracleConnectorParams) Bean2MapUtils.convertMap(OracleConnectorParams.class, oracleConnect);
//// datainfos.add(dataInfoEntity);
//// }
//
// Connection conn = OracleConnector.ConnectionBuilder("jdbc:oracle:thin:@" + oracleConnect.getIp() + ":" + oracleConnect.getPort() + "/"
// + oracleConnect.getDatabaseName(), oracleConnect.getUser(), oracleConnect.getPassword());
//
// for (OracleConnectorParams collectOracle : dataInfos) {
//
// oracleExtract.createDBLink(conn, collectOracle);
// oracleExtract.createTableSpace(conn, oracleConnect);
// oracleExtract.createUser(conn, oracleConnect);
// oracleExtract.extractColleDB(conn, collectOracle);
// }
// isSuccess = true;
// }catch(Exception e){
//
// }
// return false;
// }
}

View File

@ -1,49 +1,49 @@
package com.platform.utils;
public class Constant {
public static String rootUser = "root";
public static String rootPasswd = "root";
public static String hostIp = "192.168.0.110";
// public static String hostIp = "192.168.1.105";
public static int port = 22;
public static String glusterPeerStatus = "gluster peer status";
public static String glusterVolumeInfo = "gluster volume info ";
public static String df = "df -k ";
public static String peerincluster_connected = "PeerinCluster(Connected)";
public static String peerincluster_disconnected = "PeerinCluster(Disconnected)";
public static String peerNotinCluster = "PeerNotinCluster";
public static String distributed = "distributed";
public static String replica = "replica";
public static String stripe = "stripe";
public static String noVolume = "No volumes present";
public static String success = "success";
public static String failed = "failed";
public static String noSuchFile = "No such file or directory";
public static GanymedSSH ganymedSSH = new GanymedSSH(hostIp, rootUser, rootPasswd, port);
public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh";
public static String AutoMountfile="/gfsAutoMount/AutoRun.sh";
public static String MountRecord="/gfsAutoMount/mountPoint.record";
public static String strGetTreeData = "function ergodic(){\n "
+ "for file in \\`ls \\$1\\`\n do\n if [ \"\\$file\" != \"app\" -a -d \\$1\\\"/\\\"\\$file ]\n "
+ "then\n ergodic \\$1\"/\"\\$file\n else\n local path=\\$1\"/\"\\$file\n "
+ "echo \\$path \n fi\n done\n}\n\nIFS=\\$\\'\\n\\' "
+ "#这个必须要,否则会在文件名中有空格时出错\nINIT_PATH=\".\";\nergodic \\$1\n";
/**
* volume 获取的线程休眠时间
*/
public final static int moveFileMaxNum = 1;
/**
* volume 获取的线程休眠时间
*/
public final static int get_volume_sleep_time = 600000;
/**
* volume 获取的线程休眠时间
*/
public final static int update_dataInfo_sleep_time = 30000;
}
package com.platform.utils;
public class Constant {
public static String rootUser = "root";
public static String rootPasswd = "root";
public static String hostIp = "192.168.0.110";
// public static String hostIp = "192.168.1.105";
public static int port = 22;
public static String glusterPeerStatus = "gluster peer status";
public static String glusterVolumeInfo = "gluster volume info ";
public static String df = "df -k ";
public static String peerincluster_connected = "PeerinCluster(Connected)";
public static String peerincluster_disconnected = "PeerinCluster(Disconnected)";
public static String peerNotinCluster = "PeerNotinCluster";
public static String distributed = "distributed";
public static String replica = "replica";
public static String stripe = "stripe";
public static String noVolume = "No volumes present";
public static String success = "success";
public static String failed = "failed";
public static String noSuchFile = "No such file or directory";
public static GanymedSSH ganymedSSH = new GanymedSSH(hostIp, rootUser, rootPasswd, port);
public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh";
public static String AutoMountfile="/gfsAutoMount/AutoRun.sh";
public static String MountRecord="/gfsAutoMount/mountPoint.record";
public static String strGetTreeData = "function ergodic(){\n "
+ "for file in \\`ls \\$1\\`\n do\n if [ \"\\$file\" != \"app\" -a -d \\$1\\\"/\\\"\\$file ]\n "
+ "then\n ergodic \\$1\"/\"\\$file\n else\n local path=\\$1\"/\"\\$file\n "
+ "echo \\$path \n fi\n done\n}\n\nIFS=\\$\\'\\n\\' "
+ "#这个必须要,否则会在文件名中有空格时出错\nINIT_PATH=\".\";\nergodic \\$1\n";
/**
* volume 获取的线程休眠时间
*/
public final static int moveFileMaxNum = 1;
/**
* volume 获取的线程休眠时间
*/
public final static int get_volume_sleep_time = 600000;
/**
* volume 获取的线程休眠时间
*/
public final static int update_dataInfo_sleep_time = 30000;
}

View File

@ -1,26 +1,26 @@
package com.platform.test;
public class Brick {
private String ip;
private String path;
public Brick(String ip, String path) {
super();
this.ip = ip;
this.path = path;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
}
package com.platform.test;
public class Brick {
private String ip;
private String path;
public Brick(String ip, String path) {
super();
this.ip = ip;
this.path = path;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
}

View File

@ -1,35 +1,35 @@
package com.platform.test;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.platform.entities.FolderNode;
public class FolderReader {
public static FolderNode reader(String path) {
FolderNode folderNode = null;
File file = new File(path);
if (file.exists()) {
List<FolderNode> childrens = new ArrayList<FolderNode>();
if (file.isDirectory()) {
File[] files = file.listFiles();
for (int i = 0; i < files.length; i++) {
FolderNode children = reader(files[i].getAbsolutePath());
if (children != null)
childrens.add(children);
}
}
}
return folderNode;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
FolderReader folderReader = new FolderReader();
FolderNode folderNode = folderReader.reader("D:/bootstrap");
//folderReader.print(folderNode);
}
}
package com.platform.test;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.platform.entities.FolderNode;
public class FolderReader {
public static FolderNode reader(String path) {
FolderNode folderNode = null;
File file = new File(path);
if (file.exists()) {
List<FolderNode> childrens = new ArrayList<FolderNode>();
if (file.isDirectory()) {
File[] files = file.listFiles();
for (int i = 0; i < files.length; i++) {
FolderNode children = reader(files[i].getAbsolutePath());
if (children != null)
childrens.add(children);
}
}
}
return folderNode;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
FolderReader folderReader = new FolderReader();
FolderNode folderNode = folderReader.reader("D:/bootstrap");
//folderReader.print(folderNode);
}
}

View File

@ -1,15 +1,15 @@
package com.platform.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public class SMBasedTest {
public ApplicationContext applicationContext;
public SMBasedTest() {
applicationContext = new FileSystemXmlApplicationContext(
"test/spring-applicationContext-test.xml");
}
}
package com.platform.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public class SMBasedTest {
public ApplicationContext applicationContext;
public SMBasedTest() {
applicationContext = new FileSystemXmlApplicationContext(
"test/spring-applicationContext-test.xml");
}
}

View File

@ -1,29 +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();
}
}
}
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();
}
}
}

View File

@ -1,53 +1,53 @@
package com.platform.test;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
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.platform.entities.EncodedInfoEntity;
import com.platform.service.EncodeInfoService;
@Controller
public class TestController {
// private static Logger logger = Logger.getLogger(TestController.class);
@Resource(name = "encodeInfoService")
private EncodeInfoService eis;
public void setEis(EncodeInfoService eis) {
this.eis = eis;
}
@RequestMapping("/hello")
@ResponseBody
public List<EncodedInfoEntity> hello(String name, HttpServletResponse res) {
System.out.println(name);
return eis.getAllEncodeInfo("system_info");
}
@RequestMapping("/json")
@ResponseBody
public List<User> getJson(HttpServletRequest res, HttpServletResponse req) {
List<User> list = new ArrayList<User>();
list.add(new User("lisi", 1, ""));
list.add(new User("zhansan", 2, ""));
return list;
}
@RequestMapping("log")
public void testLog(HttpServletResponse res) {
System.out.println(eis.getEncodeNameByCode("1", "system_info"));
}
@RequestMapping("/data111.json")
public void test(String name, HttpServletResponse res){
}
}
package com.platform.test;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
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.platform.entities.EncodedInfoEntity;
import com.platform.service.EncodeInfoService;
@Controller
public class TestController {
// private static Logger logger = Logger.getLogger(TestController.class);
@Resource(name = "encodeInfoService")
private EncodeInfoService eis;
public void setEis(EncodeInfoService eis) {
this.eis = eis;
}
@RequestMapping("/hello")
@ResponseBody
public List<EncodedInfoEntity> hello(String name, HttpServletResponse res) {
System.out.println(name);
return eis.getAllEncodeInfo("system_info");
}
@RequestMapping("/json")
@ResponseBody
public List<User> getJson(HttpServletRequest res, HttpServletResponse req) {
List<User> list = new ArrayList<User>();
list.add(new User("lisi", 1, ""));
list.add(new User("zhansan", 2, ""));
return list;
}
@RequestMapping("log")
public void testLog(HttpServletResponse res) {
System.out.println(eis.getEncodeNameByCode("1", "system_info"));
}
@RequestMapping("/data111.json")
public void test(String name, HttpServletResponse res){
}
}

View File

@ -1,64 +1,64 @@
package com.platform.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.platform.dao.EncodeInfoDao;
import com.platform.entities.EncodedInfoEntity;
public class TestEncodeInfoDao extends SMBasedTest {
private EncodeInfoDao eiDao;
private String testTableName;
@Before
public void initBeforeFunction() {
eiDao = (EncodeInfoDao) this.applicationContext
.getBean("encodeInfoDao");
testTableName = "system_info";
}
@Test
public void testGetAllEntityInfo() {
List<EncodedInfoEntity> allEntities = eiDao
.getAllEntityInfo(testTableName);
System.out.println(allEntities);
Assert.assertTrue(allEntities.size() > 0);
}
@Test
public void testGetEncodeNameByCode() {
String result = eiDao.getEncodeNameByCode("1", testTableName);
Assert.assertTrue(result.equals("预算执行系统"));
}
@Test
public void testGetEncodeCodeByName() {
List<String> result = eiDao
.getEncodeCodeByName("预算执行系统", testTableName);
Assert.assertTrue(result.size() > 0);
}
@Test
public void testUpdateEncodeNameByCode() {
int result = eiDao
.updateEncodeNameByCode("3", "财政一体化平台", testTableName);
Assert.assertTrue(result > 0);
}
@Test
public void testInsertEncodeEntity() {
int result = eiDao.insertEncodeEntity(new EncodedInfoEntity("非税收入系统",
"4"), testTableName);
Assert.assertTrue(result == 1);
}
@Test
public void testDeleteEncodeByCode() {
int result = eiDao.deleteEncodeByCode("5", testTableName);
Assert.assertTrue(result >= 1);
}
}
package com.platform.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.platform.dao.EncodeInfoDao;
import com.platform.entities.EncodedInfoEntity;
public class TestEncodeInfoDao extends SMBasedTest {
private EncodeInfoDao eiDao;
private String testTableName;
@Before
public void initBeforeFunction() {
eiDao = (EncodeInfoDao) this.applicationContext
.getBean("encodeInfoDao");
testTableName = "system_info";
}
@Test
public void testGetAllEntityInfo() {
List<EncodedInfoEntity> allEntities = eiDao
.getAllEntityInfo(testTableName);
System.out.println(allEntities);
Assert.assertTrue(allEntities.size() > 0);
}
@Test
public void testGetEncodeNameByCode() {
String result = eiDao.getEncodeNameByCode("1", testTableName);
Assert.assertTrue(result.equals("预算执行系统"));
}
@Test
public void testGetEncodeCodeByName() {
List<String> result = eiDao
.getEncodeCodeByName("预算执行系统", testTableName);
Assert.assertTrue(result.size() > 0);
}
@Test
public void testUpdateEncodeNameByCode() {
int result = eiDao
.updateEncodeNameByCode("3", "财政一体化平台", testTableName);
Assert.assertTrue(result > 0);
}
@Test
public void testInsertEncodeEntity() {
int result = eiDao.insertEncodeEntity(new EncodedInfoEntity("非税收入系统",
"4"), testTableName);
Assert.assertTrue(result == 1);
}
@Test
public void testDeleteEncodeByCode() {
int result = eiDao.deleteEncodeByCode("5", testTableName);
Assert.assertTrue(result >= 1);
}
}

View File

@ -1,45 +1,45 @@
package com.platform.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.platform.entities.EncodedInfoEntity;
import com.platform.service.EncodeInfoService;
public class TestEncodeService extends SMBasedTest {
private EncodeInfoService eis;
private String testTableName;
@Before
public void initBeforeFunction() {
eis = (EncodeInfoService) this.applicationContext
.getBean("encodeInfoService");
testTableName = "system_info";
}
@Test
public void testGetEncodeNameByCode() {
String result = eis.getEncodeNameByCode("2", testTableName);
Assert.assertTrue(result.equals("部门预算"));
}
/**
* 事务测试
*/
@Test
public void testDeleteEncodeByCode() {
eis.deleteEncodeByCode("4", testTableName);
}
@Test
public void testGetAllEncodeInfo() {
List<EncodedInfoEntity> allEntities = eis
.getAllEncodeInfo(testTableName);
System.out.println(allEntities);
Assert.assertTrue(allEntities.size() >= 1);
}
}
package com.platform.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.platform.entities.EncodedInfoEntity;
import com.platform.service.EncodeInfoService;
public class TestEncodeService extends SMBasedTest {
private EncodeInfoService eis;
private String testTableName;
@Before
public void initBeforeFunction() {
eis = (EncodeInfoService) this.applicationContext
.getBean("encodeInfoService");
testTableName = "system_info";
}
@Test
public void testGetEncodeNameByCode() {
String result = eis.getEncodeNameByCode("2", testTableName);
Assert.assertTrue(result.equals("部门预算"));
}
/**
* 事务测试
*/
@Test
public void testDeleteEncodeByCode() {
eis.deleteEncodeByCode("4", testTableName);
}
@Test
public void testGetAllEncodeInfo() {
List<EncodedInfoEntity> allEntities = eis
.getAllEncodeInfo(testTableName);
System.out.println(allEntities);
Assert.assertTrue(allEntities.size() >= 1);
}
}

View File

@ -1,42 +1,42 @@
package com.platform.test;
public class User {
private String name;
private int id;
private String sex;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public User(String name, int id, String sex) {
super();
this.name = name;
this.id = id;
this.sex = sex;
}
public User(){
}
}
package com.platform.test;
public class User {
private String name;
private int id;
private String sex;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public User(String name, int id, String sex) {
super();
this.name = name;
this.id = id;
this.sex = sex;
}
public User(){
}
}

View File

@ -1,64 +1,64 @@
package com.platform.test;
import java.util.List;
import com.platform.entities.FolderNode;
public class Volume {
private String name;
private long totalSize;
private long usedSize;
private List<Brick> bricks;
private List<FolderNode> folderNode;
public Volume(String volume, long totalSize, long usedSize,
List<Brick> bricks, List<FolderNode> folderNode) {
super();
this.name = volume;
this.totalSize = totalSize;
this.usedSize = usedSize;
this.bricks = bricks;
this.folderNode = folderNode;
}
public String getVolume() {
return name;
}
public void setVolume(String name) {
this.name = name;
}
public long getTotalSize() {
return totalSize;
}
public void setTotalSize(long totalSize) {
this.totalSize = totalSize;
}
public long getUsedSize() {
return usedSize;
}
public void setUsedSize(long usedSize) {
this.usedSize = usedSize;
}
public List<Brick> getBricks() {
return bricks;
}
public void setBricks(List<Brick> bricks) {
this.bricks = bricks;
}
public List<FolderNode> getFolderNode() {
return folderNode;
}
public void setFolderNode(List<FolderNode> folderNode) {
this.folderNode = folderNode;
}
}
package com.platform.test;
import java.util.List;
import com.platform.entities.FolderNode;
public class Volume {
private String name;
private long totalSize;
private long usedSize;
private List<Brick> bricks;
private List<FolderNode> folderNode;
public Volume(String volume, long totalSize, long usedSize,
List<Brick> bricks, List<FolderNode> folderNode) {
super();
this.name = volume;
this.totalSize = totalSize;
this.usedSize = usedSize;
this.bricks = bricks;
this.folderNode = folderNode;
}
public String getVolume() {
return name;
}
public void setVolume(String name) {
this.name = name;
}
public long getTotalSize() {
return totalSize;
}
public void setTotalSize(long totalSize) {
this.totalSize = totalSize;
}
public long getUsedSize() {
return usedSize;
}
public void setUsedSize(long usedSize) {
this.usedSize = usedSize;
}
public List<Brick> getBricks() {
return bricks;
}
public void setBricks(List<Brick> bricks) {
this.bricks = bricks;
}
public List<FolderNode> getFolderNode() {
return folderNode;
}
public void setFolderNode(List<FolderNode> folderNode) {
this.folderNode = folderNode;
}
}

View File

@ -1,19 +1,19 @@
package com.platform.test;
import org.junit.Before;
import com.platform.dao.DataInfoDao;
public class testSystemInfoDao extends SMBasedTest {
private DataInfoDao dfDao;
@Before
public void initBeforeFunction() {
dfDao = (DataInfoDao) this.applicationContext.getBean("dataInfoDao");
}
// @Test @Test
public void test() {
//System.out.println(dfDao.getCount());
}
}
package com.platform.test;
import org.junit.Before;
import com.platform.dao.DataInfoDao;
public class testSystemInfoDao extends SMBasedTest {
private DataInfoDao dfDao;
@Before
public void initBeforeFunction() {
dfDao = (DataInfoDao) this.applicationContext.getBean("dataInfoDao");
}
// @Test @Test
public void test() {
//System.out.println(dfDao.getCount());
}
}

View File

@ -1,64 +1,64 @@
<?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: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
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
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">
<!-- 读取db.properties中的属性值 -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WebContent/WEB-INF/config/config.properties"></property>
</bean>
<!-- 连接MySQL数据库 -->
<bean id="mySQLDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${jdbc.mysql.driver}" />
<property name="url" value="${jdbc.mysql.url}" />
<property name="username" value="${jdbc.mysql.username}" />
<property name="password" value="${jdbc.mysql.password}" />
</bean>
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="/WebContent/WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao" />
</bean>
<!-- 配置声明式事物 -->
<bean id="mySQLTxManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="mySQLTxManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="get*" read-only="true" />
<tx:method name="select*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.platform.service.*.*(..))"
id="pointcut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut" />
</aop:config>
<bean id="user" class="com.platform.test.User">
<property name="name" value="伍名" />
<property name="id" value="1" />
<property name="sex" value="男" />
</bean>
<context:component-scan base-package="com.platform.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<?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: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
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
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">
<!-- 读取db.properties中的属性值 -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WebContent/WEB-INF/config/config.properties"></property>
</bean>
<!-- 连接MySQL数据库 -->
<bean id="mySQLDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${jdbc.mysql.driver}" />
<property name="url" value="${jdbc.mysql.url}" />
<property name="username" value="${jdbc.mysql.username}" />
<property name="password" value="${jdbc.mysql.password}" />
</bean>
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="/WebContent/WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao" />
</bean>
<!-- 配置声明式事物 -->
<bean id="mySQLTxManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="mySQLDataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="mySQLTxManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="get*" read-only="true" />
<tx:method name="select*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.platform.service.*.*(..))"
id="pointcut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut" />
</aop:config>
<bean id="user" class="com.platform.test.User">
<property name="name" value="伍名" />
<property name="id" value="1" />
<property name="sex" value="男" />
</bean>
<context:component-scan base-package="com.platform.*">
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
</beans>