Category "spring-boot"

How to get Count of OneToMany field in JPA Enity?

How can we get the count of OneToMany field of JPA entity as querying count for each parent entity while fetching as a list is costly and there is no way in JPA

Common object in two objects java

I am implementing one api and I have the following request bodies for 2 different endpoints: endpoint1: { "requests": [ { "id": "123" } ] }

Spring boot mongodb QuerydslPredicateExecutor ClassNotFoundException: com.querydsl.mongodb.document.MongodbDocumentSerializer

I'm trying to use QuerydslPredicateExecutor. Here is my repository interface: public interface ProductsRepository extends MongoRepository<Product, String

Inconsistency between postgres and hibernate

Inconsistency between hibernate and postres. Consider we have table student having 2 columns id(Primary Key) and name. Perform the following concurrent query on

Spring Boot gradle build - invalid source release: 11

I am trying to build my spring boot project with this command: ./gradlew build But it continuously throws this error: 'Execution failed for task ':compileJava'

Springboot 2.6.7 mongodb dependency not working on @SpringBootTest

I've recently upgraded my springboot dependencies from version 2.5.4 to 2.6.7 here my gradle file v2.5.4 plugins { id 'org.springframework.boot' version '2.5.4

Spring API Gateway java.net.ConnectException: Connection timed out: no further information

I have a spring boot app with simple GET method "sayHello" i have configured API gateway to route calls to my microservice module when uri pattern matches /ms1/

Hibernate: How to create multi-column index on join table

I have two entity classes: Taco @Data @Entity @Table(name="Taco") public class Taco { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) @

How to Retrieve OAuth2AuthorizedClient in a request when using WebFlux

I have a back-end(Springboot) application that is connected to Azure AD and a front-end application that accesses it. In the front-end, I am requiring the user

@Autowire returns null after adding Spring AOP in an abstract base class

I'm using POM in my selenium automation project, so there is an abstract class BasePage extended by a DerivedPage which is used for test method The method which

Cannot resolve symbol 'CachingSpringLoadBalancerFactory'

I have this code that I would like to migrate to the latest version of 'org.springframework.cloud:spring-cloud-openfeign-core:3.1.1' import feign.Client; import

Struggling to switch between databases at runtime with Spring boot

I'm trying to change which database is used at runtime (like from H2 to MySQL and back). Is it also possible to make both of them be used simultaneously (meanin

How to solve Chinese garbled when using javax.servlet.Filter

ContentCachingResponseWrapper wrapper = new ContentCachingResponseWrapper(response); wrapper.setContentType("application/json;charset=UTF-8"); wrapper.setCharac

Django Authorization Checking in URL having wild card pattern

I am trying to implement permission checking mechanism in URLs for a request using wildcard techniques, rather than implement permission checking on each views.

Uncaught Error: Objects are not valid as a React child (found: object with keys {message})

I have ReactJS application which receives data from SpringBoot API. I am successfully able to receive the data from SpringBoot as seen through console.log(). B

How to use a Spring WebClient to parse specific data from an external API?

I'm attempting to use the Spring WebFlux WebClient to retrieve data from the openweathermap API. I've done this using a RestTemplate no problem, but want to und

Parse Huge xml file in spring boot and load to oracle

I have a requirement to load huge xml file having 1 million records and load to the oracle table. Each record has starting and end tags as and there are many a

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

How to write test cases for Service layer using Junit 4 and mockito

My Repository layer is returning list object, But in my service layer i am filtering out all other and return a single Object. when i try to create test cases i