• Stars
    star
    1,228
  • Rank 38,042 (Top 0.8 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spring 5 Reactive playground

Spring Reactive Sample

This is a sandbox project for demonstrating Reactive Streams support in Spring framework and Spring ecosystem.

I've also maintained a series of repos related to ReativeStreams and the latest Spring 5.

The source codes are updated to Spring 6/Spring Boot 3.0, the Spring Boot 2.7.x based codes are available in a compressed archive and tagged with v1.0.

Docs

Read online: https://hantsy.github.io/spring-reactive-sample/

Sample Codes

The following table list all sample codes related to the above posts.

Spring Samples

name description
vanilla The initial application, includes basic spring-webflux feature, use a main class to start up the application
vanilla-jetty Same as vanilla, but use Jetty as target runtime
vanilla-tomcat Same as vanilla, but use Reactor Netty as target runtime
vanilla-undertow Same as vanilla, but use Undertow as target runtime
java8 Java 8 CompletableFuture and @Async example
java9 Same as vanilla, Java 9 Flow API support is not ready in Spring 5.0.0.REALESE, planned in 5.0.1, see issue SPR-16052 and the original discussion on stackoverflow
rxjava3 Same as vanilla, but use Rxjava3 instead of Reactor, since Spring 5.3.0
smallrye-mutiny Same as vanilla, but use SmallRye Mutiny instead of Reactor, since Spring 5.3.10
war Replace the manual bootstrap class in vanilla with Spring ApplicationInitializer, it can be packaged as a war file to be deployed into an external servlet container.
routes Use RouterFunction instead of controller in vanilla
register-bean Programmatic approach to register all beans in ApplicatonContext at the application bootstrap
data-neo4j Spring Data Neo4j reactive example
data-mongo Spring Data Mongo Reactive example
data-mongo-pageable Spring Data Mongo Reactive example with pagination support
data-mongo-transaction Spring Data Mongo Reactive example with Transaction support
data-redis Spring Data Redis Reactive example
data-redis-message Spring Data Redis Reactive Example with ReactiveRedisMessageListenerContainer
data-cassandra Spring Data Cassandra Reactive example
data-couchbase Spring Data Couchbase Reactive example
security Based on vanilla, add Spring Security Reactive support
security-form Same as security, login form example
security-user-properties Same as security, but use users.properties to store users
security-method Replace URI based configuration with method level constraints
security-data-mongo Based on data-mongo and security, replace with dummy users in hard codes with Mongo driven store
multipart Multipart request handling and file uploading
multipart-data-mongo Multipart and file uploading, but data in Mongo via Spring Data Mongo Reactive GridFsTemplate
mvc-thymeleaf Traditional web application, use Thymeleaf as template engine
mvc-mustache Traditional web application, use Mustache as template engine
mvc-freemarker Traditional web application, use freemarker as template engine
sse Server Send Event example
websocket WebSocket example
web-filter WebFilter example
groovy Written in groovy
groovy-dsl Groovy DSL bean definition example
client Example of WebClient to shake hands with backend reactive APIs
kotlin Written in kotlin
kotlin-routes Use kotlin functional approach to declare beans and bootstrap the application programmatically
kotlin-dsl Kotlin DSL bean definition example
session Spring Session Example
session-header Spring Session WebSessionIdResolver Example
session-data-redis Spring Data Redis based ReactiveSessionRepository Example
session-data-mongo Spring Data Mongo based ReactiveSessionRepository Example
exception-handler Exception Handler Example
integration Spring Integration Example
integration-dsl Spring Integration Java 8 DSL Example
restdocs Spring RestDocs Example

Spring Boot Samples

name description
boot-start Spring Boot example, including 3 Maven profiles to switch to Jetty, Tomcat, Undertow as target runtime
boot-start-routes Simple RouterFunction example
boot-mvc-thymeleaf Same as mvc-thymeleaf, but based on Spring Boot
boot-mvc-mustache Same as mvc-mustache, but based on Spring Boot
boot-mvc-freemarker Same as mvc-freemarker, but based on Spring Boot
boot-groovy Written in Groovy
boot-kotlin Written in Kotlin
boot-kotlin-dsl Kotlin specific BeanDefinitionDSL Example
boot-redis Example of using ReactiveRedisConnection and RouterFunction
boot-data-redis Spring Data Redis Example
boot-data-neo4j Spring Data Neo4j example (Spring Boot 2.4)
boot-neo4j Spring Data Neo4j using ReactiveNeo4jOperations (Spring Boot 2.4)
boot-neo4j-cypher Spring Data Neo4j using ReacitveNeo4jClient (Spring Boot 2.4)
boot-data-cassandra Spring Data Cassandra Example
boot-data-couchbase Spring Data Couchbase Example
boot-data-elasticsearch Spring Data ElasticSearch Example
boot-data-mongo Spring Data Mongo Example(Repository, Auditing, testcontainers)
boot-data-mongo-querydsl Spring Data Mongo Example with QueryDSL support
boot-data-mongo-gridfs Spring Data Mongo Example with Gridfs support
boot-data-mongo-tailable Spring Data Mongo tailable document example
boot-exception-handler Global Exception Handler

Legacy Codes

Some example codes are becoming deprecated as time goes by, eg. the SDN Rx project which was maintained by the Neo4j team is discontinued now, it is highly recommended to migrate to the official Spring Data Neo4j.

And Spring Data R2dbc 1.2 added a lot of breaking changes, so I created another Spring R2dbc Sample repository to introduce the new features.

Spring removed support of RxJava/RxJava2, and other projects, such as Spring Data will remove RxJava/RxJava2 support soon.

name description
data-r2dbc Spring Data R2dbc Example. (Deprecated, go to hantsy/spring-r2dbc-sample to update yourself)
data-r2dbc-postgresql Spring Data R2dbc Example, but use PostgreSQL instead(Deprecated)
boot-r2dbc Spring Data R2dbc example using DatabaseClient(Deprecated)
boot-data-r2dbc Spring Data R2dbc example(Deprecated)
boot-data-r2dbc-auditing @EnableR2dbcAuditing example(Deprecated)
boot-data-r2dbc-postgresql Same as boot-data-r2dbc, but use PostgresSQL instead(Deprecated)
boot-data-r2dbc-mysql Same as boot-data-r2dbc, but use MySQL instead(Deprecated)
boot-data-r2dbc-mssql Same as boot-data-r2dbc, but use MS SQL instead(Deprecated)
boot-neo4j-rx SDN Rx Example but use ReactiveNeo4jClient(Deprecated)
boot-neo4j-rx-cypher SDN Rx Example using Cypher queries(Deprecated)
boot-data-neo4j-rx SDN Rx Example(Deprecated)
rxjava Same as vanilla, but use Rxjava instead of Reactor
rxjava-jdbc Accessing database with rxjava-jdbc. NOTE: rxjava-jdbc is a wrapper of blocking Jdbc APIs
rxjava2 Same as vanilla, but use Rxjava2 instead of Reactor
rxjava2-jdbc Accessing database with rxjava2-jdbc. NOTE: rxjava2-jdbc is a wrapper of blocking Jdbc APIs

References

Special Thanks

Specials thanks for Jetbrains's support by contributing an open-source license.

More Repositories

1

spring-webmvc-jwt-sample

Secures REST APIs with Spring Security and JWT Token based Authentication
Java
439
star
2

nestjs-rest-sample

NestJS RESTful APIs Sample
TypeScript
328
star
3

angularjs-springmvc-sample-boot

A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.
Java
314
star
4

spring-microservice-sample

Spring Boot based Mircoservice sample
Java
298
star
5

angularjs-springmvc-sample

A RESTful sample using AnguarJS/Bootstrap as frontend and Spring MVC as REST API producer
Java
291
star
6

angular-spring-reactive-sample

RESTful API demos with Spring 5 WebFlux, Spring Boot 2, Spring Data Mongo, Spring Security, Spring Session and Angular (upgraded to v13)
TypeScript
224
star
7

spring-reactive-jwt-sample

Secures REST APIs with Spring Security and JWT Token-based Authentication powered by Spring Reactive stack
Java
161
star
8

spring-r2dbc-sample

Code samples for demonstrating R2dbc, Spring R2dbc, and Spring Data R2dbc.
Java
154
star
9

angularjs-cakephp-sample

A RESTful sample using AnguarJS/Bootstrap as frontend and CakePHP as REST API producer.
PHP
113
star
10

spring-puzzles

Code samples for tips, problem-resolving methods, patterns in Spring development
Java
79
star
11

spring-graphql-sample

Spring GraphQL examples using Netflix DGS, GraphQL Java and Spring GraphQL
Java
76
star
12

jakartaee9-starter-boilerplate

Jakarta EE 9 starter boilerplate project
Java
69
star
13

angularjs-grails-sample

A RESTful sample using AngularJS/Bootstrap as frontend and Grails as REST API producer
JavaScript
65
star
14

spring4-sandbox

Sample codes to demonstrate new features of Spring 4.x
Java
59
star
15

jakartaee8-starter-boilerplate

A boilerplate project for starting a Jakarta EE 8 application in seconds
Java
59
star
16

quarkus-sandbox

Quarkus playground
HTML
58
star
17

keycloak-springsecurity5-sample

Spring Security 5 OAuth2 Client/OIDC integration with Keycloak sample
Java
56
star
18

awesome-javaee8

Awesome Java EE 8 resource checklist
52
star
19

spring-kotlin-coroutines-sample

Spring Kotlin Coroutines sample
Kotlin
51
star
20

ee8-sandbox

Java EE 8/Jakarta EE 8 sandbox
Java
49
star
21

ee7-sandbox

Java EE 7 sandbox
Java
40
star
22

spring-sandbox

Spring demo application
Java
39
star
23

rsocket-sample

RSocket sandbox
Java
37
star
24

angularjs-zf2-sample

A RESTful sample using AngularJS/Bootstrap as frontend and Zend2 Framework as REST API producer
PHP
37
star
25

spring6-sandbox

Spring 6 and Spring Boot 3 playground
Java
34
star
26

symfony-rest-sample

Symfony REST Example
PHP
30
star
27

javaee8-jsf-sample

A Java EE 8 sample application
Java
29
star
28

javaee8-jaxrs-sample

RESTful APIs Demo built with Java EE 8 and JAXRS 2.1
Java
29
star
29

jakartaee-faces-sample

Jakarta EE 10 Faces Example
Java
27
star
30

angular-spring-rsocket-sample

Demo for using Angular and Spring RSocket together
TypeScript
26
star
31

vertx-sandbox

Eclipse Vertx playground
Java
24
star
32

spring-reactive-kotlin-sample

Spring 5 Webflux Demo built with Kotlin.
Kotlin
21
star
33

spring-native-example

Spring Native example application
Java
20
star
34

jakartaee9-servlet-starter-boilerplate

A Jakarta EE starter project boilerplate for Jakarta Servlet 5.0 (aligned with Jakarta EE 9) Container
Java
18
star
35

jakartaee-mvc-sample

Jakarta EE 10 MVC sample
Java
17
star
36

angular2-sample

Angular 2 sample with Angular CLI, TypeScript, Angular 2, Bootstrap 4, RxJS, JWT, Firebase/AngularFire2
TypeScript
17
star
37

ee7-jaxrs-sample

Building RESTful APIs with Java EE 7 and JAXRS
Java
17
star
38

javaee8-by-example-gitbook

A developer's notes for Java EE 8 upgrade
16
star
39

spring-webmvc-functional-sample

Spring MVC functional sample
Java
16
star
40

nestjs-graphql-sample

NestJS GraphQL Example
TypeScript
13
star
41

angular-spring-sse-sample

Demo for using Angular and Spring WebFlux Server Sent Events together
TypeScript
13
star
42

angular-spring-websocket-sample

Demo for using Angular and Spring Reactive WebSocket together
TypeScript
13
star
43

jakartaee-rest-sample

Jakarta EE 10 Rest Sample
Java
12
star
44

java-sandbox

The sandbox for playing the new features introduced in the next generation of Java.
Java
11
star
45

building-restful-apis-with-springmvc-gitbook

Gitbook source of Building RESTful APIs with Spring MVC
11
star
46

jakartaee10-sandbox

Jakarta EE 10 sandbox
Java
10
star
47

helidon-sandbox

Playground of helidon framework
Java
9
star
48

spring-reactive-microservice-sample

Spring Microservice Demo built with Spring 5 newly introduced Reactive stack
Java
9
star
49

spring-cloud-sample

Wires up Microservice with Spring Cloud
Java
9
star
50

spring-security-auth0-sample

Spring Security 5 with OAuth2/OIDC and Auth0 integration example
TypeScript
8
star
51

code-challenges

Code challenges in learning new languages, frameworks, engineering tools, architectures, software design patterns, etc.
Java
8
star
52

angular-es6-sample

AngularJS 1.5+ sample with ECMAScript 2015/ES6, Bootstrap 4 and Webpack
JavaScript
8
star
53

devops-sandbox

DevOps sandbox
Shell
7
star
54

spring-kotlin-dsl-sample

Spring Kotlin DSL, Spring Fu (Jafu, Kofu) demos
Kotlin
6
star
55

maven-archetype-jakartaee9

Maven archetype for Jakarta EE 9
Java
6
star
56

cargotracker-regapp

Cargotracker RegisterApp Client written in JavaFX
Java
5
star
57

seam3-sandbox

Seam 3 Sandbox to demostrate seam3 feature or reproduce my issues
HTML
5
star
58

nestjs-graphql-prisma-sample

Nestjs GraphQL Prisma Example
TypeScript
4
star
59

quarkus-auth0-sample

Secures Quarkus applications with OAuth2/Oidc and Auth0
Java
4
star
60

urlshortener-kotlin

Kotlin
3
star
61

reactor-examples

Reactor/ReactiveStreams sandbox
Java
3
star
62

angular-spring-book

Fullstack development with Angular and Spring(Boot)
Java
3
star
63

micronaut-sandbox

Micronaut playground
Java
3
star
64

angular2-material-sample

Angular 2 sample with Angular CLI, Angular 2 Material etc
TypeScript
3
star
65

click4nb

A NetBeans IDE plugin which provide basic support for the Apache Click framework
Java
3
star
66

angular2-firebase-sample

Angular 2 sample with Angular CLI, AngularFire2, Firebase etc
TypeScript
2
star
67

hantsy

it's me
2
star
68

hantsy.github.io

Personal website
HTML
2
star
69

jakartaee10-starter-boilerplate

Jakarta EE 10 Stater Boilerplate for starting a Jakarta EE 10 project
Java
2
star
70

react-spring-mongo-kotlin

React, Spring Boot, Spring Data Mongo, Kotlin Coroutines Example
Kotlin
1
star
71

nodejs-sandbox

NodeJS sandbox
HTML
1
star
72

contracts-git

Contracts for https://github.com/hantsy/spring-cloud-sample/tree/master/contract-producer-rest-git
Groovy
1
star
73

spring-security-reactive-auth0-sample

Spring Security Reactive and OAuth2(Auth0) Resource Example
Kotlin
1
star
74

kotlin-coroutines-examples

Kotlin Coroutines playground
Kotlin
1
star
75

angular-sandbox

Angular playground for Angular 2+
TypeScript
1
star