Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Spring 5/6 Reactive playground

License

NotificationsYou must be signed in to change notification settings

hantsy/spring-reactive-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a sandbox project for demonstratingReactive 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 toSpring 6/Spring Boot 3.0, the Spring Boot 2.7.x based codes are available ina compressed archive and tagged withv1.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

namedescription
vanillaThe initial application, includes basicspring-webflux feature, use a main class to start up the application
vanilla-reactor-netty2Same asvanilla, but use Reactor Netty5 2.x as target runtime
vanilla-jettySame asvanilla, but use Jetty as target runtime
vanilla-tomcatSame asvanilla, but use Reactor Netty as target runtime
vanilla-undertowSame asvanilla, but use Undertow as target runtime
java8Java 8CompletableFuture and@Async example
java9Same asvanilla, Java 9 Flow API support is not ready in Spring 5.0.0.REALESE, planned in 5.0.1, see issueSPR-16052 and the originaldiscussion on stackoverflow
rxjava3Same asvanilla, but use Rxjava3 instead of Reactor, since Spring 5.3.0
smallrye-mutinySame asvanilla, but useSmallRye Mutiny instead of Reactor, since Spring 5.3.10
warReplace the manual bootstrap class invanilla with SpringApplicationInitializer, it can be packaged as awar file to be deployed into an external servlet container.
routesUseRouterFunction instead of controller invanilla
register-beanProgrammatic approach to register all beans inApplicatonContext at the application bootstrap
data-elasticsearchSpring Data ElasticSearch Reactive example
data-neo4jSpring Data Neo4j reactive example
data-mongoSpring Data Mongo Reactive example
data-mongo-pageableSpring Data Mongo Reactive example with pagination support
data-mongo-transactionSpring Data Mongo Reactive example withTransaction support
data-redisSpring Data Redis Reactive example
data-redis-messageSpring Data Redis Reactive Example withReactiveRedisMessageListenerContainer
data-cassandraSpring Data Cassandra Reactive example
data-couchbaseSpring Data Couchbase Reactive example
securityBased onvanilla, add Spring Security Reactive support
security-formSame as security, login form example
security-user-propertiesSame as security, but useusers.properties to store users
security-methodReplace URI based configuration with method level constraints
security-data-mongoBased ondata-mongo andsecurity, replace with dummy users in hard codes with Mongo driven store
multipartMultipart request handling and file uploading
multipart-data-mongoMultipart and file uploading, but data in Mongo via Spring Data Mongo ReactiveGridFsTemplate
mvc-thymeleafTraditional web application, use Thymeleaf as template engine
mvc-mustacheTraditional web application, use Mustache as template engine
mvc-freemarkerTraditional web application, use freemarker as template engine
sseServer Send Event example
websocketWebSocket example
websocket-reactor-netty2WebSocket example with Reactor Netty2
web-filterWebFilter example
groovyWritten in groovy
groovy-dslGroovy DSL bean definition example
clientExample ofWebClient to shake hands with backend reactive APIs
client-jettyExample ofWebClient with Jetty Reactive HttpClient
client-reactor-netty2Example ofWebClient with Reactor Netty5 2.x HttpClient
client-jdk11-httpclientExample ofWebClient with JDK 11 HttpClient
client-apache-httpclient5Example ofWebClient with Apache HttpClient5
cacheExample of Cache Aync/Reactive support(with in-memoryConcurrentHashMap)
cache-caffeineExample of Cache Aync/Reactive support with Caffeine
cache-redisExample of Cache Aync/Reactive support with Redis
eventApplication Event Reactive Example
kotlinWritten in kotlin
kotlin-coWritten in kotlin Coroutines
kotlin-routesUse kotlin functional approach to declare beans and bootstrap the application programmatically
kotlin-dslKotlin DSL bean definition example
scheduleSpring Schedule Reactive Example
sessionSpring Session Example
session-headerSpring SessionWebSessionIdResolver Example
session-data-redisSpring Data Redis basedReactiveSessionRepository Example
session-data-mongoSpring Data Mongo basedReactiveSessionRepository Example
exception-handlerException Handler Example
integrationSpring Integration Example
integration-dslSpring Integration Java 8 DSL Example
restdocsSpring RestDocs Example

Spring Boot Samples

namedescription
boot-startSpring Boot example, including 3 Maven profiles to switch to Jetty, Tomcat, Undertow as target runtime
boot-start-routesSimpleRouterFunction example
boot-mvc-thymeleafSame as mvc-thymeleaf, but based on Spring Boot
boot-mvc-mustacheSame as mvc-mustache, but based on Spring Boot
boot-mvc-freemarkerSame as mvc-freemarker, but based on Spring Boot
boot-groovyWritten in Groovy
boot-kotlinWritten in Kotlin
boot-kotlin-coWritten in Kotlin Coroutines
boot-kotlin-dslKotlin specificBeanDefinitionDSL andRouterFunctionDsl Example
boot-kotlin-co-dslKotlin specificBeanDefinitionDSL,CoRouterFunctionDsl Example
boot-redisExample of usingReactiveRedisConnection andRouterFunction
boot-data-redisSpring Data Redis Example
boot-data-neo4jSpring Data Neo4j example (Spring Boot 2.4)
boot-neo4jSpring Data Neo4j usingReactiveNeo4jOperations (Spring Boot 2.4)
boot-neo4j-cypherSpring Data Neo4j usingReacitveNeo4jClient (Spring Boot 2.4)
boot-data-cassandraSpring Data Cassandra Example
boot-data-couchbaseSpring Data Couchbase Example
boot-data-elasticsearchSpring Data ElasticSearch Example
boot-data-mongoSpring Data Mongo Example(Repository, Auditing, testcontainers)
boot-data-mongo-querydslSpring Data Mongo Example with QueryDSL support
boot-data-mongo-gridfsSpring Data Mongo Example with Gridfs support
boot-data-mongo-tailableSpring Data Mongo tailable document example
boot-exception-handlerGlobal Exception Handler
boot-pulsarSpring for Pulsar Reactive Example

Legacy Codes

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

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

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

namedescription
data-r2dbcSpring Data R2dbc Example. (Deprecated, go tohantsy/spring-r2dbc-sample to update yourself)
data-r2dbc-postgresqlSpring Data R2dbc Example, but use PostgreSQL instead(Deprecated)
boot-r2dbcSpring Data R2dbc example usingDatabaseClient(Deprecated)
boot-data-r2dbcSpring Data R2dbc example(Deprecated)
boot-data-r2dbc-auditing@EnableR2dbcAuditing example(Deprecated)
boot-data-r2dbc-postgresqlSame as boot-data-r2dbc, but use PostgresSQL instead(Deprecated)
boot-data-r2dbc-mysqlSame as boot-data-r2dbc, but use MySQL instead(Deprecated)
boot-data-r2dbc-mssqlSame as boot-data-r2dbc, but use MS SQL instead(Deprecated)
boot-neo4j-rxSDN Rx Example but useReactiveNeo4jClient(Deprecated)
boot-neo4j-rx-cypherSDN Rx Example using Cypher queries(Deprecated)
boot-data-neo4j-rxSDN Rx Example(Deprecated)
rxjavaSame asvanilla, but use Rxjava instead of Reactor
rxjava-jdbcAccessing database with rxjava-jdbc.NOTE: rxjava-jdbc is a wrapper of blocking Jdbc APIs
rxjava2Same asvanilla, but use Rxjava2 instead of Reactor
rxjava2-jdbcAccessing 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.

Sponsor this project

    Packages

    No packages published

    Contributors10


    [8]ページ先頭

    ©2009-2025 Movatter.jp