File tree 4 files changed +61
-0
lines changed
src/main/java/com/sandeep
4 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ .classpath
2
+ .project
3
+ target
Original file line number Diff line number Diff line change
1
+ FROM java:8
2
+ EXPOSE 8080:8080
3
+ ADD /target/springdocker-demo.jar springdocker-demo.jar
4
+ ENTRYPOINT ["java" ,"-jar" ,"springdocker-demo.jar" ]
Original file line number Diff line number Diff line change
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 >docker.samples</groupId >
5
+ <artifactId >SpringBootEx</artifactId >
6
+ <version >0.0.1-SNAPSHOT</version >
7
+ <packaging >jar</packaging >
8
+
9
+ <parent >
10
+ <groupId >org.springframework.boot</groupId >
11
+ <artifactId >spring-boot-starter-parent</artifactId >
12
+ <version >1.5.6.RELEASE</version >
13
+ </parent >
14
+
15
+ <properties >
16
+ <java .version>1.8</java .version>
17
+ </properties >
18
+
19
+ <dependencies >
20
+ <dependency >
21
+ <groupId >org.springframework.boot</groupId >
22
+ <artifactId >spring-boot-starter-web</artifactId >
23
+ </dependency >
24
+ </dependencies >
25
+ <build >
26
+ <finalName >springdocker-demo</finalName >
27
+ <plugins >
28
+ <plugin >
29
+ <groupId >org.springframework.boot</groupId >
30
+ <artifactId >spring-boot-maven-plugin</artifactId >
31
+ </plugin >
32
+ </plugins >
33
+ </build >
34
+ </project >
Original file line number Diff line number Diff line change
1
+ package com .sandeep ;
2
+ import org .springframework .boot .SpringApplication ;
3
+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
4
+ import org .springframework .web .bind .annotation .RequestMapping ;
5
+ import org .springframework .web .bind .annotation .RestController ;
6
+
7
+ @ RestController
8
+ @ SpringBootApplication
9
+ public class Application {
10
+
11
+ @ RequestMapping ("/" )
12
+ String home () {
13
+ return "Hello World!" ;
14
+ }
15
+
16
+ public static void main (String [] args ) throws Exception {
17
+ SpringApplication .run (Application .class , args );
18
+ }
19
+
20
+ }
You can’t perform that action at this time.
0 commit comments