初始化项目结构,包括基本的文件和目录设置
此次提交创建了项目的基本文件和目录结构,涵盖了.gitignore文件、源代码的初始Java类、一个测试文件、一个配置文件(tianhe.yml)、以及Maven的项目对象模型(pom.xml)。这为项目的进一步开发打下了基础。master
commit
b01671d7f3
|
@ -0,0 +1,10 @@
|
||||||
|
#过滤target文件下生成的编译文件
|
||||||
|
target/
|
||||||
|
.project
|
||||||
|
.settings/
|
||||||
|
.metadata/
|
||||||
|
.classpath
|
||||||
|
*.MF
|
||||||
|
|
||||||
|
.idea
|
||||||
|
*.iml
|
|
@ -0,0 +1,25 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.example</groupId>
|
||||||
|
<artifactId>tianhe</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>tianhe</name>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.tianhe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hello world!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class App
|
||||||
|
{
|
||||||
|
public static void main( String[] args )
|
||||||
|
{
|
||||||
|
System.out.println( "Hello World!" );
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.tianhe.common;
|
||||||
|
|
||||||
|
public interface Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 命令名称
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CommandName name();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 环境 id
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String envId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id,等同于节点 id
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String agentId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令唯一标识
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String commandId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采用 jfireSE 进行序列化,然后使用 Base64编码后存储,方便于 http 传输。
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String content();
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package org.tianhe.common;
|
||||||
|
|
||||||
|
public enum CommandName
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package org.tianhe;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for simple App.
|
||||||
|
*/
|
||||||
|
public class AppTest
|
||||||
|
extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the test case
|
||||||
|
*
|
||||||
|
* @param testName name of the test case
|
||||||
|
*/
|
||||||
|
public AppTest( String testName )
|
||||||
|
{
|
||||||
|
super( testName );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the suite of tests being tested
|
||||||
|
*/
|
||||||
|
public static Test suite()
|
||||||
|
{
|
||||||
|
return new TestSuite( AppTest.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rigourous Test :-)
|
||||||
|
*/
|
||||||
|
public void testApp()
|
||||||
|
{
|
||||||
|
assertTrue( true );
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
Operation:
|
||||||
|
enable: true
|
||||||
|
download:
|
||||||
|
prefix: http://localhost:2000
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://localhost:3306/operation?useUnicode=true&characterEncoding=utf8&useSSL=false&&allowPublicKeyRetrieval=true
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
Agent:
|
||||||
|
enable: true
|
||||||
|
duration:
|
||||||
|
report: 100000
|
||||||
|
next_command: 1000
|
||||||
|
download:
|
||||||
|
mode: 2
|
||||||
|
size: 524288
|
||||||
|
upload:
|
||||||
|
size: 5242880
|
||||||
|
app:
|
||||||
|
cloudApp:
|
||||||
|
url: http://localhost:10081/cloudApp/endpoint
|
||||||
|
port: 10081
|
||||||
|
hosApp:
|
||||||
|
url: http://localhost:10086/config/endpoint
|
||||||
|
port: 10086
|
||||||
|
operation:
|
||||||
|
url: http://localhost:39999/api
|
||||||
|
env:
|
||||||
|
envId: TestId
|
||||||
|
agentId: 1
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://localhost:3306/chsdrg?useUnicode=true&characterEncoding=utf8&useSSL=false&&allowPublicKeyRetrieval=true
|
||||||
|
username: root
|
||||||
|
password: root
|
Loading…
Reference in New Issue