File tree Expand file tree Collapse file tree 4 files changed +88
-0
lines changed
src/main/java/com/mydeveloperplanet/myawsplanet Expand file tree Collapse file tree 4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change 1+ # Project exclude paths
2+ /target /
Original file line number Diff line number Diff line change 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 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
4+ <modelVersion >4.0.0</modelVersion >
5+ <parent >
6+ <groupId >org.springframework.boot</groupId >
7+ <artifactId >spring-boot-starter-parent</artifactId >
8+ <version >2.4.2</version >
9+ <relativePath /> <!-- lookup parent from repository -->
10+ </parent >
11+ <groupId >com.mydeveloperplanet</groupId >
12+ <artifactId >MyAWSPlanet</artifactId >
13+ <version >0.0.1-SNAPSHOT</version >
14+ <name >MyAWSPlanet</name >
15+ <description >Demo project for Spring Boot integration with AWS</description >
16+
17+ <properties >
18+ <java .version>11</java .version>
19+ </properties >
20+
21+ <dependencies >
22+ <dependency >
23+ <groupId >org.springframework.boot</groupId >
24+ <artifactId >spring-boot-starter-web</artifactId >
25+ </dependency >
26+
27+ <dependency >
28+ <groupId >org.springframework.boot</groupId >
29+ <artifactId >spring-boot-starter-test</artifactId >
30+ <scope >test</scope >
31+ <exclusions >
32+ <exclusion >
33+ <groupId >org.junit.vintage</groupId >
34+ <artifactId >junit-vintage-engine</artifactId >
35+ </exclusion >
36+ </exclusions >
37+ </dependency >
38+ </dependencies >
39+
40+ <build >
41+ <plugins >
42+ <plugin >
43+ <groupId >org.springframework.boot</groupId >
44+ <artifactId >spring-boot-maven-plugin</artifactId >
45+ </plugin >
46+ </plugins >
47+ </build >
48+
49+ </project >
Original file line number Diff line number Diff line change 1+ package com .mydeveloperplanet .myawsplanet ;
2+
3+ import org .springframework .web .bind .annotation .GetMapping ;
4+ import org .springframework .web .bind .annotation .RestController ;
5+
6+ import java .net .InetAddress ;
7+ import java .net .UnknownHostException ;
8+
9+ @ RestController
10+ public class HelloController {
11+
12+ @ GetMapping ("/hello" )
13+ public String hello () {
14+ String message = "Hello AWS!" ;
15+ try {
16+ InetAddress ip = InetAddress .getLocalHost ();
17+ message += " From host: " + ip ;
18+ } catch (UnknownHostException e ) {
19+ e .printStackTrace ();
20+ }
21+ return message ;
22+ }
23+
24+ }
Original file line number Diff line number Diff line change 1+ package com .mydeveloperplanet .myawsplanet ;
2+
3+ import org .springframework .boot .SpringApplication ;
4+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
5+
6+ @ SpringBootApplication
7+ public class MyAWSPlanetApplication {
8+
9+ public static void main (String [] args ) {
10+ SpringApplication .run (MyAWSPlanetApplication .class , args );
11+ }
12+
13+ }
You can’t perform that action at this time.
0 commit comments