How to random access chunks (start from any specific chunk, not necessarily from the first) in GridFS in Reactive MongoDB in the Spring Framework?
With the ReactiveGridFsTemplate available since Spring Boot 2.2 I cannot see any way.
Is there any low level method to do it?
NOTE: I opened a feature request in Spring Data Mongo Jira
Related
I was trying to create a CRUD app using spring boot and postgres ,alongwith spring native.But I couldn't find any proper documentation related to it apart from spring native documentation.
The part of how to integrate it with postgres,is what I am looking for.Thankyou
You can use Spring Data like you would in a standard Spring Boot application. Depending on the type of application, you can use Spring Data JDBC, Spring Data JPA (if you need the Hibernate features), or Spring Data R2DBC (for reactive apps). If you bootstrap your application from start.spring.io, you can directly select the PostgreSQL dependency from there.
To get started with Spring Data, you can refer to this guide on the Spring website: relational data access with Spring Data JDBC. It uses H2, but you can replace it with PostgreSQL. More details are available on the project documentation.
On my GitHub, you can find an example of Spring Boot application with a REST API, security, and data persistence with PostgreSQL. And packaged as a native executable through Spring Native. If you're new to Spring Native, I wrote an article about how to get started with it.
I am new to spring boot and I am developing a simple spring boot API to store data to a couchbase db. Storing JSON objects have different formats.Is there any suitable method to achieve this?
Couchbase has given support for the JAVA SDK's that can help you easily integrate the couchbase api's and access the couchbase server to perform CRUD operation's here is the tutorial available : JAVA SDK
And also please take a look at this blog couchbase with Spring Boot sample example
Can Spring Cloud Data Flow be used in Spring5 applications - NOT Spring Boot - my current employer seems to view Spring Boot applications as insecure (I've no idea why) in anyway I'd like to try use this stack for an integration project, so is it possible to use it without Spring Boot?
With Spring Cloud Data Flow you can deploy streams, tasks and batches.
This is all based on Spring, Spring Cloud and Spring Boot. Spring Boot is nothing else as a preconfigured Spring stack.
Spring Data Flow is a runitme that usually needs a cloud infrastructure like Kubernets.
I'm not sure if you really are looking for that or more for something like https://spring.io/projects/spring-integration
We want to try GraphQL in our Spring based application. (its not based on spring boot). Our data repository is MongoDB. I saw various examples based on node, which makes use of graphQL + Mongo. There is also library which is with spring boot!
Can it be used directly? Or there is non spring-boot lib available?
The main thing you'd gain from Spring Boot is auto configuration for Spring Data's Mongo driver.
If you're comfortable injecting the MongoRepository into the GraphQL data sources and resolves on your own, then no, you don't need Spring Boot
I have wrote REST APIs in java Spring Framework.
I have referred this github project and my project structure is very similar to this.
My application contains Spring Boot, Spring Security, Spring Security OAuth, Spring Data JPA and Spring mongodb.
I have observed that on start, the application consumes more than 100MB and increases 2MB on each URL request. Also mongodb connection is not closed automatically after some timeout.
I am not able to figure out this application start up memory usage. (is this because of spring boot or spring security or any other lib ?)
Is there any other best java framework for quick REST API development with Security, OAuth and MongoDB feature.
I want memory optimized REST APIs.