Category "spring"

JPA duplicate entry error on EntityManager.remove and then EntityManager.persist

I am using Hibernate implementation of JPA. Let's say I have a list of objects which I have to persist in a table called Event. All these objects have the same

Best Practice to transform request headers before passing it to rest contoller

I am working on a Spring Boot project with Java 11. I have a rest controller that has a GET endpoint. The controller method takes account number as one of its a

i have this exception "org.hibernate.tool.schema.spi.CommandAcceptanceException:

this is my code package com.examplesector.choosesectors.models.Entity; import lombok.*; import javax.persistence.*; import javax.validation.constraints.Size;

How get two joined tables from database in Spring Jpa?

I have two tables, joined each other. How I can get from database both of them using Spring data jpa? Code as below, @Entity @JsonNaming(PropertyNamingStrategie

no validator found for custom annotation and validation for enum springboot java8

Getting this error HV000030: No validator could be found for constraint EnumChecker validating type MyEnum Check configuration for ‘myenum’. Using t

Springboot Actuator Refresh does not reload @Value properties in @ConfigurationProperties

I have a springboot application that ingests an application.properties via @ConfigurationProperties and @PropertySource("classpath:application.properties"). My

IntegrationFlow memory leak

I have two integration flows that get files from two different directories. @Bean public IntegrationFlow processBridgeFlow() { return Integratio

Can we make folder inside template package of SpringBoot Application?

I have been working on dummy Web application, and there are lot html file in template which I want to organize. I am getting an error when I have keeping them i

Hibernate XML Entity Mapping

I have simple definition of my entities, but what i do wrong, because i can not get any entity UserInfo and receive only error (could not load an entity: [UserI

spring quartz does not run

All libraries and settings are in progress, but spring quartz does not run. QRTZ_LOCKS, QRTZ_ in DBThe SCHEDULER_STATE table contains data, but the Trigger tabl

OAuth2 with Google and Spring Boot - I can't log out

I've been trying to get a successful Oauth2 login with Google and Spring Boot for a while now. This only works partially. Why partly - because I can't manage th

org.eclipse.jgit.api.errors.RefNotFoundException: Ref main cannot be resolved - with Spring Cloud Config Server

I am again extending my question: Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref master cannot be resolved here again: I am using Spring Boot

Map database record to entity without knowing its id

Basically I have the system where there is entity called Dictionary, where all dictionary entries are stored (like countries in example below), these entries ar

java.lang.NoClassDefFoundError: Could not initialize class org.springframework.web.reactive.function.client.DefaultExchangeStrategiesBuilder

I am trying to use spring WebClient wc = WebClient.create(); in a non-Spring application, but it looks like DefaultExchangeStrategiesBuilder.DEFAULT_EXCHANGE_ST

Issue :: Microsoft Cognitive Services :: client-sdk :: Azure

I am trying to use Azure cognitive services and trying to convert "Text To Speech". I am able to convert the Text to Speech successfully on my local machine. Th

Spring 2.6.7: Failed to configure a DataSource: 'url' attribute

I have created a new Spring Starter Project and I specified in application.properties the db settings: spring.jpa.hibernate.ddl-auto=update spring.datasource.dr

How use projections in spring-data-jpa?

I need to get all the information about the ticket in one request, also the name, author, and year of the book. I have implemented this : I create interface Tic

UnsupportedPointcutPrimitiveException: Pointcut expression 'getEncryptedValue()' contains unsupported pointcut primitive 'get'

I was using spring-boot-starter-parent 2.0.3-RELEASE, using pointcut primitive 'get' in my aspect like below. @Pointcut("get(* *) && @annotation(com.tes

Spring boot addFlashAttribute not displaying message in HTML

I've been searching here and online how to use addFlashAttribute in the best way and it's not working for me no matter what I do. I have a Student model which I

How can generate a swagger from my spring boot application?

I have created a web rest API using Spring boot and I would like to generate a swagger page with the APIs documentation. How can I do that?