Spring Zero is "Spring for Snowboarders". If you are kewl, or
just impatient, and you want to use Spring, then this is the place to
be. Spring Zero is a toolkit and runtime platform that will get
you up and running with Spring-powered, production-grade applications
and services with absolute minimum fuss. It takes an opinionated view
of the Spring family so that new and existing users can quickly get to
the bits they need. Assumes no knowledge of the Java development
ecosystem. Absolutely no code generation and no XML (unless you really
want it).
Spring Zero is "Spring for Snowboarders". If you are kewl, or just impatient, and you
want to use Spring, then this is the place to be. Spring Zero is the code-name for a
group of related technologies, that will get you up and running with
Spring-powered, production-grade applications and services with absolute minimum fuss.
It takes an opinionated view of the Spring family so that new and existing users can
quickly get to the bits they need. Assumes limited knowledge of the Java development
ecosystem. Absolutely no code generation and no XML (unless you really want it).
The goals are:
* Radically faster and widely accessible getting started experience for Spring
development
* Be opinionated out of the box, but get out of the way quickly as requirements start to
diverge from the defaults
* Provide a range of non-functional features that are common to large classes of projects
(e.g. embedded servers, security, metrics, health checks, externalized configuration)
* First class support for REST-ful services, modern web applications, batch jobs, and
enterprise integration
* Applications that adapt their behavior or configuration to their environment
* Optionally use Groovy features like DSLs and AST transformations to accelerate the
implementation of basic business requirements
* Radically faster and widely accessible getting started experience
for Spring development
* Be opinionated out of the box, but get out of the way quickly as
requirements start to diverge from the defaults
* Provide a range of non-functional features that are common to large
classes of projects (e.g. embedded servers, security, metrics,
health checks, externalized configuration)
* First class support for REST-ful services, modern web applications,
batch jobs, and enterprise integration
* Applications that adapt their behaviour or configuration to their
environment
* Optionally use Groovy features like DSLs and AST transformations to
accelerate the implementation of basic business requirements
## Installing
You need to build from source for now, but when it's done instructions will look like this:
You need to [build from source](#building-from-source) for now, but when it's done
instructions will look like this:
1) Get Java. Download and install the Java SDK from www.java.com
1) Get Java. Download and install the Java SDK from [www.java.com](http://www.java.com)
2) Get Spring
$ curl -s spring.cfapps.io/installer | bash
or use the Windows installer
$ curl -s spring.cfapps.io/installer | bash
or use the [Windows installer](#installing)
## Building from source
Spring Zero can be [built with maven](http://maven.apache.org/run-maven/index.html) v3.0
or above.
$ mvn clean install
An `alias` can be used for the Spring Zero command line tool:
$ alias spr="java -jar ~/.m2/repository/org/springframework/zero/spring-cli/0.5.0.BUILD-SNAPSHOT/spring-cli-0.5.0.BUILD-SNAPSHOT.jar"
_Also see [CONTRIBUTING.md](/CONTRIBUTING.md) if you want to submit pull requests._
3) Get to Work!
$ cat > app.groovy
## Quick Start Example
The Spring Zero command line tool uses Groovy underneath so that we can present simple
snippets that can just run, for example:
$ cat > app.groovy
@Controller
class ThisWillActuallyRun {
@RequestMapping("/")
@ -48,30 +60,24 @@ You need to build from source for now, but when it's done instructions will look
@@ -48,30 +60,24 @@ You need to build from source for now, but when it's done instructions will look
return "Hello World!"
}
}
$ spring run app.groovy
$ curl localhost:8080
Hello World!
## What? It's Groovy then? or like Grails? or Roo?
<ctrl-d>
$ spr run app.groovy
$ curl localhost:8080
Hello World!
There is a command line tool that uses Groovy underneath so that we
can present simple snippets that can just run just like the slimline
`app.groovy` example above. Groovy makes this really easy.
If you don't want to use the command line tool, or you would rather
work using Java and an IDE you can. Just add a `main()` method that
calls `SpringApplication` and add `@EnableAutoConfiguration`:
If you don't want to use the command line tool, or you would rather work using Java and
an IDE you can. Just add a `main()` method that calls `SpringApplication` and