Commit 3662a8b3 authored by Rob Winch's avatar Rob Winch Committed by Dave Syer

Fix README Quick Start Java Example

 - Update pom.xml to be valid
 - Change to use milestone repository instead of snapshot
 - Add file name for SampleController.java
 - Correct EnableAutoConfiguration import
 - Add missing ;
parent 461f508c
...@@ -79,8 +79,11 @@ an IDE you can. Create a `pom.xml` (or the equivalent with your favourite build ...@@ -79,8 +79,11 @@ an IDE you can. Create a `pom.xml` (or the equivalent with your favourite build
`pom.xml` `pom.xml`
```xml ```xml
<pom> <?xml version="1.0" encoding="UTF-8"?>
<artifactId>myproject</myproject> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>myproject</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -105,24 +108,24 @@ an IDE you can. Create a `pom.xml` (or the equivalent with your favourite build ...@@ -105,24 +108,24 @@ an IDE you can. Create a `pom.xml` (or the equivalent with your favourite build
<!-- TODO: remove once Spring Boot is in Maven Central --> <!-- TODO: remove once Spring Boot is in Maven Central -->
<repositories> <repositories>
<repository> <repository>
<id>spring-snapshots</id> <id>spring-milestone</id>
<url>http://repo.springsource.org/snapshot</url> <url>http://repo.springsource.org/milestone</url>
<snapshots><enabled>true</enabled></snapshots>
</repository> </repository>
</repositories> </repositories>
<pluginRepositories> <pluginRepositories>
<pluginRepository> <pluginRepository>
<id>spring-snapshots</id> <id>spring-milestone</id>
<url>http://repo.springsource.org/snapshot</url> <url>http://repo.springsource.org/milestone</url>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository> </pluginRepository>
</pluginRepositories> </pluginRepositories>
</pom> </project>
``` ```
Then just add a class in `src/main/java` with a `main()` method that Then just add a class in `src/main/java` with a `main()` method that
calls `SpringApplication` and add `@EnableAutoConfiguration`, e.g: calls `SpringApplication` and add `@EnableAutoConfiguration`, e.g:
`src/main/java/SampleController.java`
```java ```java
import org.springframework.boot.*; import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*; import org.springframework.boot.autoconfigure.*;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment