Initial commit
This commit is contained in:
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