Commit 563df2a9 by Dave Syer

Move README to src/main/asciidoc

parent edc8fffe
Ths project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms.
include::intro.adoc[]
# Eureka Clients
Example eureka client:
```
@Configuration
@ComponentScan
@EnableAutoConfiguration
@RestController
public class Application {
@RequestMapping("/")
public String home() {
return "Hello world";
}
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).web(true).run(args);
}
}
```
(i.e. utterly normal Spring Boot app). Configuration is required to locate the Eureka server. Example:
```
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8080/v2/
default.defaultZone: http://localhost:8080/v2/
```
The default application name, virtual host and non-secure port are taken from the `Environment` is
`${spring.application.name}`, `${spring.application.name}.mydomain.net` and `${server.port}` respectively.
# TODO List
== TODO List
- [x] Example front end app (currently in sandbox)
- [x] Example back end service (currently in sandbox)
......
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms.
= Spring Cloud Netflix
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms.
include::intro.adoc[]
== Service Discovery: Eureka Clients
......
#!/usr/bin/env ruby
base_dir = File.join(File.dirname(__FILE__),'../../..')
src_dir = File.join(base_dir, "/src/main/asciidoc")
require File.join(File.dirname(__FILE__), 'readme.rb')
options = {}
ARGV.length > 0 and options[:to_file] = ARGV[0]
SpringCloud::Build.render_file("#{src_dir}/README.adoc", options)
module SpringCloud
module Build
IncludeDirectiveRx = /^\\?include::([^\[]+)\[(.*?)\]$/
class << self
def process_include out, src, target, attrs
unless target.start_with?('/')
target = File.new(File.join(src, target))
else
target = File.new(target)
end
target.each do |line|
self.process(out, File.dirname(target), line)
end
end
def process out, src, line
if ((escaped = line.start_with?('\\include::')) || line.start_with?('include::')) && (match = IncludeDirectiveRx.match(line))
if escaped
out << line[1..-1]
else
self.process_include out, src, match[1], match[2].strip
end
else
out << line
end
end
def render_file file, options = {}
srcDir = File.dirname(file)
out = ["// Do not edit this file (go to #{file} instead)",""]
File.new(file).each do |line|
self.process(out, srcDir, line)
end
unless options[:to_file]
puts out
else
writer = File.new(options[:to_file],'w+')
out.each { |line| writer.write(line) }
end
end
end
end
end
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