I am trying to write a client for my server (both in Kotlin and using Spring Reactive Web). I encountered this problem while trying to use the RSocket. How can I get a Flux using RSocket? Answer You need to get reference of Class. You can use either Int::class.java or Int::class depending whether you need jav…
Tag: spring-boot
Getting error to import Spring boot parent into Pom.xml
I am trying to create a sample Spring-Boot project using maven but when i imported into Eclipse. I am getting an error in Pom.xml about spring-boot parent but when i run mvn command from terminal. It works fine. Also, in main class, it does not recognize org.springframework.* I am getting an error which says …
Aggregation with multiple criteria
I want to perform aggregation using multiple criteria. The problem is that I don’t know how to pass multiple criteria. Do I declare multiple Match operation like below? And if yes, then how do I pass them to the aggregation method? I thought that it should be possible to create a MatchOperation that adh…
How to return CREATED status (201 HTTP) in ResponseEntity
There is a Spring-MVC application. In controllers, when returning the results of methods, I return via ResponseEntity<>. On success, I return (200 statutes) the OK-method. But when creating something, I would like to return the CREATED-method (201 status). I just can’t understand what kind of URL to ask…
Stop current running Spring boot in linux
i am running a springboot application in linux.To run this springboot we use below command. This spring boot application makes an endpoint available which is then used by other services. Now when the new version of .jar is available i have to stop the current running .jar and again run the above mentioned com…
Unable to reload Maven project: Cannot reconnect. java.lang.RuntimeException: Cannot reconnect
i got a new Mac Book and installed IntellJ, as soon as I try to import (new Project from existing source) a maven project i get the error “Unable to reload Maven project”. To make it simpler, i just created a new simple maven project via start.spring.io to make sure I dont have any fancy dependenc…
Spring boot cannot connect to postgre database deployed on another kubernetes pod
I deployed my microservice hello-k8s in a pod and another pod as postgre-server, I have successfully connected to localhost using port-forward and try to create a table in the deployed database. But when I deploy hello-k8s it return error due to database connection attempt failed. Disclaimer: kube-dns is work…
What are the minimum requirements for Spring JPA
I am trying to setup a simple Spring JPA connection with Docker-Compose. This is my docker-compose.yml: My pom.xml looks like this: I’m used to see Spring trying to connect to a database before starting anything. I set up some temporary Repositories to make sure it had some Entities to work with. The lo…
Insert embeded document without reading whole document – spring, mongo
I have this factory collection : @Document(collection = “factory”) public class Factory { Private List products; } which embeds the Product as products. When I have to add a …
cannot resolve this error: unable to insert NULL in (“NAWFEL”. “ORDO_DEP_UUSATEUR”. “EMPLOI”)
I’m developing a user registration form, the problem I get is that when I want to test my web service in postman it shows me the following error in my eclipse console: he tells me that I cannot insert a null value in the job “emploi” column, but I entered the value of the job column in my po…