Browse Source

first commit

Kr Younger 6 years ago
commit
0d62807afa
5 changed files with 92 additions and 0 deletions
  1. 17
    0
      .gitignore
  2. 3
    0
      .vscode/settings.json
  3. 18
    0
      README.md
  4. 37
    0
      pom.xml
  5. 17
    0
      src/main/java/SimpleSimon.java

+ 17
- 0
.gitignore View File

@@ -0,0 +1,17 @@
1
+*.sw?
2
+.#*
3
+*#
4
+*~
5
+.classpath
6
+.project
7
+.settings
8
+bin
9
+build
10
+target
11
+dependency-reduced-pom.xml
12
+*.sublime-*
13
+/scratch
14
+.gradle
15
+README.html
16
+.idea
17
+*.iml

+ 3
- 0
.vscode/settings.json View File

@@ -0,0 +1,3 @@
1
+{
2
+    "java.configuration.updateBuildConfiguration": "automatic"
3
+}

+ 18
- 0
README.md View File

@@ -0,0 +1,18 @@
1
+
2
+### Simplest SimpleSimon server
3
+
4
+to run from the project's directory:
5
+
6
+$ mvn spring-boot:run
7
+
8
+If ain't got Maven, well, figure that out.
9
+
10
+And if it works, look at all those amazinly informative log messages!
11
+
12
+And then... In another terminal....
13
+
14
+$ curl localhost:8080
15
+```
16
+<h2>Simple Simon Says: Hello World.</h2>
17
+```
18
+and **TaDa!!**

+ 37
- 0
pom.xml View File

@@ -0,0 +1,37 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+    <modelVersion>4.0.0</modelVersion>
5
+
6
+    <groupId>rocks.zipcode</groupId>
7
+    <artifactId>simplesimon</artifactId>
8
+    <version>0.1.0</version>
9
+
10
+    <parent>
11
+        <groupId>org.springframework.boot</groupId>
12
+        <artifactId>spring-boot-starter-parent</artifactId>
13
+        <version>2.0.3.RELEASE</version>
14
+    </parent>
15
+
16
+    <dependencies>
17
+        <dependency>
18
+            <groupId>org.springframework.boot</groupId>
19
+            <artifactId>spring-boot-starter-web</artifactId>
20
+        </dependency>
21
+    </dependencies>
22
+
23
+    <properties>
24
+        <java.version>1.8</java.version>
25
+    </properties>
26
+
27
+
28
+    <build>
29
+        <plugins>
30
+            <plugin>
31
+                <groupId>org.springframework.boot</groupId>
32
+                <artifactId>spring-boot-maven-plugin</artifactId>
33
+            </plugin>
34
+        </plugins>
35
+    </build>
36
+
37
+</project>

+ 17
- 0
src/main/java/SimpleSimon.java View File

@@ -0,0 +1,17 @@
1
+import org.springframework.boot.*;
2
+import org.springframework.boot.autoconfigure.*;
3
+import org.springframework.web.bind.annotation.*;
4
+
5
+@RestController
6
+@EnableAutoConfiguration
7
+public class SimpleSimon {
8
+
9
+	public static void main(String[] args) throws Exception {
10
+		SpringApplication.run(SimpleSimon.class, args);
11
+	}
12
+	
13
+	@RequestMapping("/")
14
+	public String home() {
15
+	 return "<h2>Simple Simon Says: Hello World.</h2>\n";
16
+	}
17
+}