Initial commit
This commit is contained in:
44
app/pom.xml
Normal file
44
app/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>com.dockerforjavadevelopers</groupId>
|
||||
<artifactId>app</artifactId>
|
||||
<version>0.1.0</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.1.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<start-class>com.dockerforjavadevelopers.hello.Application</start-class>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
19
app/src/main/java/com/app/hello/Application.java
Executable file
19
app/src/main/java/com/app/hello/Application.java
Executable file
@@ -0,0 +1,19 @@
|
||||
package com.dockerforjavadevelopers.hello;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ApplicationContext ctx = SpringApplication.run(Application.class, args);
|
||||
|
||||
}
|
||||
|
||||
}
|
14
app/src/main/java/com/app/hello/HelloController.java
Executable file
14
app/src/main/java/com/app/hello/HelloController.java
Executable file
@@ -0,0 +1,14 @@
|
||||
package com.dockerforjavadevelopers.hello;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@RestController
|
||||
public class HelloController {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String index() {
|
||||
return "Hello World! Nice to see you :-)\n";
|
||||
}
|
||||
|
||||
}
|
13
app/src/test/java/com/app/hello/DummyTest.java
Executable file
13
app/src/test/java/com/app/hello/DummyTest.java
Executable file
@@ -0,0 +1,13 @@
|
||||
package com.dockerforjavadevelopers.hello;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class DummyTest {
|
||||
|
||||
@Test
|
||||
public void aTest() {
|
||||
assertEquals(true, true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user