Skip to content

Commit a73a3fb

Browse files
author
Paula Qian
committed
first commit
0 parents  commit a73a3fb

File tree

145 files changed

+9077
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+9077
-0
lines changed

.classpath

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
26+
<attributes>
27+
<attribute name="maven.pomderived" value="true"/>
28+
</attributes>
29+
</classpathentry>
30+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
31+
<attributes>
32+
<attribute name="maven.pomderived" value="true"/>
33+
</attributes>
34+
</classpathentry>
35+
<classpathentry kind="output" path="target/classes"/>
36+
</classpath>

.project

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>globalDataService</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.m2e.core.maven2Builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.jdt.core.javanature</nature>
26+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
27+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
28+
</natures>
29+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8

.settings/org.eclipse.jdt.core.prefs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
3+
org.eclipse.jdt.core.compiler.compliance=1.5
4+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5+
org.eclipse.jdt.core.compiler.source=1.5

.settings/org.eclipse.m2e.core.prefs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled=06target
2+
eclipse.preferences.version=1

pom.xml

+202
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.globalData</groupId>
5+
<artifactId>globalDataService</artifactId>
6+
<version>0.0.1-SNAPSHOT</version>
7+
<name>globalDataService</name>
8+
<description>globalDataService</description>
9+
10+
<parent>
11+
<groupId>org.springframework.boot</groupId>
12+
<artifactId>spring-boot-starter-parent</artifactId>
13+
<version>1.5.1.RELEASE</version>
14+
</parent>
15+
16+
<packaging>war</packaging>
17+
18+
<dependencies>
19+
<!-- https://mvnrepository.com/artifact/junit/junit-dep -->
20+
<dependency>
21+
<groupId>junit</groupId>
22+
<artifactId>junit-dep</artifactId>
23+
<version>4.8</version>
24+
</dependency>
25+
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
26+
<dependency>
27+
<groupId>log4j</groupId>
28+
<artifactId>log4j</artifactId>
29+
<version>1.2.17</version>
30+
</dependency>
31+
32+
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
33+
<dependency>
34+
<groupId>org.mybatis</groupId>
35+
<artifactId>mybatis</artifactId>
36+
<version>3.4.2</version>
37+
</dependency>
38+
39+
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
40+
<dependency>
41+
<groupId>mysql</groupId>
42+
<artifactId>mysql-connector-java</artifactId>
43+
<version>5.1.6</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-starter-web</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.springframework.boot</groupId>
51+
<artifactId>spring-boot-starter-tomcat</artifactId>
52+
<scope>provided</scope>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-starter-web</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.springframework.boot</groupId>
61+
<artifactId>spring-boot-starter-test</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.jayway.jsonpath</groupId>
66+
<artifactId>json-path</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>com.fasterxml.jackson.core</groupId>
71+
<artifactId>jackson-databind</artifactId>
72+
<version>2.6.3</version>
73+
</dependency>
74+
75+
</dependencies>
76+
77+
<build>
78+
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
79+
<testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
80+
<resources>
81+
<resource>
82+
<filtering>false</filtering>
83+
<directory>${basedir}/src/main/resources</directory>
84+
<includes>
85+
<include>**/*</include>
86+
</includes>
87+
</resource>
88+
</resources>
89+
<testResources>
90+
<testResource>
91+
<filtering>false</filtering>
92+
<directory>${basedir}/src/test/resources</directory>
93+
<includes>
94+
<include>**/*</include>
95+
</includes>
96+
</testResource>
97+
</testResources>
98+
99+
<plugins>
100+
<plugin>
101+
<groupId>org.sonatype.plugins</groupId>
102+
<artifactId>nexus-staging-maven-plugin</artifactId>
103+
<version>1.6.7</version>
104+
<extensions>true</extensions>
105+
<configuration>
106+
<serverId>ossrh</serverId>
107+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
108+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
109+
</configuration>
110+
</plugin>
111+
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId>
112+
<version>2.5.3</version> </plugin> -->
113+
114+
<plugin>
115+
<groupId>org.springframework.boot</groupId>
116+
<artifactId>spring-boot-maven-plugin</artifactId>
117+
</plugin>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-source-plugin</artifactId>
121+
<version>3.0.1</version>
122+
<executions>
123+
<execution>
124+
<id>attach-sources</id>
125+
<goals>
126+
<goal>jar</goal>
127+
</goals>
128+
</execution>
129+
</executions>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-javadoc-plugin</artifactId>
134+
<version>2.10.4</version>
135+
<executions>
136+
<execution>
137+
<id>attach-javadocs</id>
138+
<goals>
139+
<goal>jar</goal>
140+
</goals>
141+
</execution>
142+
</executions>
143+
</plugin>
144+
<plugin>
145+
<groupId>org.apache.maven.plugins</groupId>
146+
<artifactId>maven-surefire-plugin</artifactId>
147+
<version>2.14</version>
148+
<dependencies>
149+
<dependency>
150+
<groupId>org.apache.maven.surefire</groupId>
151+
<artifactId>surefire-junit47</artifactId>
152+
<version>2.14</version>
153+
</dependency>
154+
</dependencies>
155+
</plugin>
156+
157+
<plugin>
158+
<groupId>org.apache.maven.plugins</groupId>
159+
<artifactId>maven-compiler-plugin</artifactId>
160+
<version>3.3</version>
161+
</plugin>
162+
</plugins>
163+
<pluginManagement>
164+
<plugins>
165+
<!--This plugin's configuration is used to store Eclipse m2e settings
166+
only. It has no influence on the Maven build itself. -->
167+
<plugin>
168+
<groupId>org.eclipse.m2e</groupId>
169+
<artifactId>lifecycle-mapping</artifactId>
170+
<version>1.0.0</version>
171+
<configuration>
172+
<lifecycleMappingMetadata>
173+
<pluginExecutions>
174+
<pluginExecution>
175+
<pluginExecutionFilter>
176+
<groupId>
177+
org.apache.maven.plugins
178+
</groupId>
179+
<artifactId>
180+
maven-compiler-plugin
181+
</artifactId>
182+
<versionRange>
183+
[3.3,)
184+
</versionRange>
185+
<goals>
186+
<goal>compile</goal>
187+
<goal>testCompile</goal>
188+
</goals>
189+
</pluginExecutionFilter>
190+
<action>
191+
<ignore></ignore>
192+
</action>
193+
</pluginExecution>
194+
</pluginExecutions>
195+
</lifecycleMappingMetadata>
196+
</configuration>
197+
</plugin>
198+
</plugins>
199+
</pluginManagement>
200+
</build>
201+
202+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.globalData.controller;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.boot.builder.SpringApplicationBuilder;
6+
import org.springframework.boot.web.support.SpringBootServletInitializer;
7+
8+
@SpringBootApplication
9+
public class Application extends SpringBootServletInitializer {
10+
11+
@Override
12+
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
13+
return application.sources(Application.class);
14+
}
15+
16+
public static void main(String[] args) throws Exception {
17+
SpringApplication.run(Application.class, args);
18+
}
19+
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.globalData.controller;
2+
3+
import java.util.List;
4+
5+
import org.springframework.web.bind.annotation.RequestMapping;
6+
import org.springframework.web.bind.annotation.RequestParam;
7+
import org.springframework.web.bind.annotation.RestController;
8+
9+
import com.globalData.dao.DataTypeDao;
10+
import com.globalData.dao.impl.DataTypeDaoImpl;
11+
import com.globalData.vo.DataTypeVO;
12+
13+
@RestController
14+
public class DataServiceController {
15+
16+
17+
@RequestMapping("/dataTypes")
18+
public List<DataTypeVO> getDataTypes(@RequestParam(value="name", defaultValue="World") String name) {
19+
DataTypeDao typeDao = new DataTypeDaoImpl();
20+
return typeDao.getDataTypes();
21+
}
22+
23+
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.globalData.controller;
2+
3+
public class Greeting {
4+
5+
private final long id;
6+
private final String content ;
7+
8+
public Greeting(long id, String content) {
9+
this.id = id;
10+
this.content = content;
11+
}
12+
13+
public long getId() {
14+
return id;
15+
}
16+
17+
public String getContent() {
18+
return content + "test!!!!";
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.globalData.controller;
2+
3+
import java.util.concurrent.atomic.AtomicLong;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
import org.springframework.web.bind.annotation.RequestParam;
6+
import org.springframework.web.bind.annotation.RestController;
7+
8+
@RestController
9+
public class GreetingController {
10+
11+
private static final String template = "Hello, %s!";
12+
private final AtomicLong counter = new AtomicLong();
13+
14+
@RequestMapping("/greeting")
15+
public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
16+
return new Greeting(counter.incrementAndGet(),
17+
String.format(template, name));
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.globalData.dao;
2+
3+
import java.util.List;
4+
5+
import com.globalData.vo.DataTypeVO;
6+
7+
public interface DataTypeDao {
8+
9+
List<DataTypeVO> getDataTypes();
10+
11+
}

0 commit comments

Comments
 (0)