Skip to content
Advertisement

Tag: spring

RSocket retrieveFlux() with Kotlin

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 java Class or KClass reference

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 that My Pom.xml looks like this

Trusted SSL certificate showing as self signed

I have a trusted TLS certificate deliverd by DigiCert that I’m trying to use in a java/spring application exposing rest apis. I created a .p12 file with openssl doing the following : openssl pkcs12 -export -in mycertificate.cer -certfile mycertificate_INTERMEDIATE.cer -inkey myprivate_key.key -out myCert.p12 I am able to use this file in my application to access the app through https with

JPA cascade actions on one-to-one relationship

I have the following question regarding one to one relationships (and I guess one to many also): Let’s suppose I have the following tables: As you can see the two tables share the same primary key. Now the entities I created are the following: When I try to persist a new user I have a user object with all the

What is Querydsl PathBuilder String parameter ‘variable’ used for

I’m working with Querydsl in my Spring Boot API for making some complex data filtering and when i declare the PathBuilder variable i’ve seen that first you have to pass statically your class like YourClass.class and then a string variable for the constructor as shown below: So i was wondering why is necessary this string parameter and also why its

How can i add data to th:action form

I have a spring-boot application. Full url that I need: localhost:8080/company/{companyName}/users?name={name}. In the beginning i choose company, for ex. : localhost:8080/company/google. The controller redirects me to the page with the form (company.html), where i type name. Controller: In Data class i simply store company and name; My form, where i type name: So after i submit, the result url is

SpringBoot DTO Validation

I am new to spring-boot I’m trying to add validation to my DTO class like below. Below is my REST endpoint to save employee. I create a Validation class like below to validate the DTO fields. expected output is { “firstName”:”Employee first name is required”, “employeeNum”:”EmployeeNUM is required” } But I’m getting only the 400 bad request when hit the

Advertisement