diff --git a/_config.yml b/_config.yml index ddc41fb5d..1e27c6bc8 100644 --- a/_config.yml +++ b/_config.yml @@ -10,24 +10,24 @@ redcarpet: ### The following properties will change on a project-by-project basis # Context path in the remote website (usually /), will be prepended to absolute URLs for static resources -baseurl: /gh-pages +baseurl: /spring-cloud-streams # Name of the project for display in places like page titles -name: Spring Framework +name: Spring Cloud Streams # ID of the project in the metadata API at spring.io (if this is not a # valid project ID the javascript widgets in the home page will not work) -project: spring-framework +project: spring-cloud-streams # Project github URL -github_repo_url: http://github.com/spring-projects/spring-framework +github_repo_url: http://github.com/spring-cloud/spring-cloud-streams # Project forum URL -forum: http://forum.spring.io/forum/spring-projects/container +forum: http://stackoverflow.com/questions/tagged/spring-cloud # If you want to include a custom pom.xml or gradle template set these value to true and add _include files -custom_pom_template: false -custom_gradle_template: false +custom_pom_template: true +custom_gradle_template: true ### The following properties are constant for most projects diff --git a/_includes/build.gradle b/_includes/build.gradle new file mode 100644 index 000000000..549c268b3 --- /dev/null +++ b/_includes/build.gradle @@ -0,0 +1,19 @@ +buildscript { + dependencies { + classpath "io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE" + } +} + +apply plugin: "io.spring.dependency-management" + +dependencyManagement { + imports { + mavenBom '{@= groupId @}:spring-cloud-streams-parent:{@= version @}' + } +} + +dependencies { + compile '{@= groupId @}:spring-cloud-streams' + compile 'org.springframework.boot:spring-boot-starter-redis' + compile 'org.springframework.xd:spring-xd-messagebus-redis' +} \ No newline at end of file diff --git a/_includes/pom.xml b/_includes/pom.xml new file mode 100644 index 000000000..b39ffb8c8 --- /dev/null +++ b/_includes/pom.xml @@ -0,0 +1,25 @@ + + + + {@= groupId @} + spring-cloud-streams-parent + {@= version @} + pom + import + + + + + + {@= groupId @} + {@= artifactId @} + + + org.springframework.xd + spring-xd-messagebus-redis + + + org.springframework.boot + spring-boot-starter-redis + + diff --git a/img/project-icon-large.png b/img/project-icon-large.png new file mode 100644 index 000000000..ec935d118 Binary files /dev/null and b/img/project-icon-large.png differ diff --git a/index.html b/index.html new file mode 100644 index 000000000..3ff2add7a --- /dev/null +++ b/index.html @@ -0,0 +1,90 @@ +--- +# The name of your project +title: Spring Cloud Streams + +badges: + + # Customize your project's badges. Delete any entries that do not apply. + custom: + - name: Source (GitHub) + url: https://github.com/spring-cloud/spring-cloud-streams + icon: github + + - name: StackOverflow + url: http://stackoverflow.com/questions/tagged/spring-cloud + icon: stackoverflow + +--- + + + + +{% capture parent_link %} +[Spring Cloud]({{ site.projects_site_url }}/spring-cloud) +{% endcapture %} + + +{% capture billboard_description %} + +Spring Cloud Streams allows a user to develop and run messaging microservices using Spring Integration and run them locally, or in the cloud, or even on Spring XD. Just create `MessageChannels` "input" and/or "output" and add `@EnableChannelBinding` and run your app as a Spring Boot app (single application context). You just need to connect to the physical broker for the bus, which is automatic if the relevant bus implementation is available on the classpath. + +{% endcapture %} + +{% capture main_content %} + + +## Quick Start + +{% include download_widget.md %} + +As long as Spring Cloud Streams and a Spring XD Message Bus is on the +classpath any Spring Boot application with `@EnableChannelBinding` will bind to an external broker provided by the bus (e.g. redis, rabbit, kafka, depending on the implementation you choose). Sample application: + +```java +@SpringBootApplication +@EnableChannelBinding +@ComponentScan(basePackageClasses=ModuleDefinition.class) +public class ModuleApplication { + + public static void main(String[] args) throws InterruptedException { + SpringApplication.run(ModuleApplication.class, args); + } + +} + +@Configuration +public class ModuleDefinition { + + @Value("${format}") + private String format; + + @Bean + public MessageChannel output() { + return new DirectChannel(); + } + + @Bean + @InboundChannelAdapter(value = "output", autoStartup = "false", poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1")) + public MessageSource timerMessageSource() { + return () -> new GenericMessage<>(new SimpleDateFormat(format).format(new Date())); + } + +} +``` + +{% endcapture %} + +{% capture related_resources %} + +### Sample Projects + +* [Source](https://github.com/spring-cloud/spring-cloud-streams/tree/master/spring-cloud-streams-samples/source) +* [Sink](https://github.com/spring-cloud/spring-cloud-streams/tree/master/spring-cloud-streams-samples/sink) +* [Transformer](https://github.com/spring-cloud/spring-cloud-streams/tree/master/spring-cloud-streams-samples/transformer) +* [Mashup](https://github.com/spring-cloud/spring-cloud-streams/tree/master/spring-cloud-streams-samples/extended) + +{% endcapture %} + + +{% include project_page.html %} +