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 ;
This commit is contained in:
parent
461f508cc6
commit
3662a8b347
21
README.md
21
README.md
@ -79,8 +79,11 @@ an IDE you can. Create a `pom.xml` (or the equivalent with your favourite build
|
||||
`pom.xml`
|
||||
|
||||
```xml
|
||||
<pom>
|
||||
<artifactId>myproject</myproject>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -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 -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<url>http://repo.springsource.org/snapshot</url>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<id>spring-milestone</id>
|
||||
<url>http://repo.springsource.org/milestone</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<url>http://repo.springsource.org/snapshot</url>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<id>spring-milestone</id>
|
||||
<url>http://repo.springsource.org/milestone</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</pom>
|
||||
</project>
|
||||
```
|
||||
|
||||
Then just add a class in `src/main/java` with a `main()` method that
|
||||
calls `SpringApplication` and add `@EnableAutoConfiguration`, e.g:
|
||||
|
||||
`src/main/java/SampleController.java`
|
||||
|
||||
```java
|
||||
import org.springframework.boot.*;
|
||||
import org.springframework.boot.autoconfigure.*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user