-
Notifications
You must be signed in to change notification settings - Fork 12
Spring
Greg Swindle edited this page Nov 11, 2017
·
8 revisions
$ brew update
$ brew tap pivotal/tap
$ brew install springboot
$ spring help
Open a Terminal/CLI to begin.
-
Create a a Maven
pom.xml
file:$ atom pom.xml
-
Copy and paste the following XML into the
pom.xml
document:<?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.example</groupId> <artifactId>myproject</artifactId> <version>0.0.1-SNAPSHOT</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.8.RELEASE</version> </parent> <!-- Additional lines to be added here... --> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> </project>
-
Confirm installation:
$ mvn dependency:tree
Open a Terminal/CLI to begin.
-
From the same directory that hosts your
pom.xml
file, run:$ mvn spring-boot:run
-
Open a web browser and go to http://localhost:8080.
©️ 2017, Greg Swindle