All Questions
Tagged with spring-boot spring-data-jpa
10,757 questions
0
votes
1
answer
62
views
What could be the issue with this composite key and query setup in Spring Data JPA?
I'm working on a Spring Boot project using JPA and trying to query an entity that uses a composite primary key with @IdClass, but I can't get the repository method to work.
I've double-checked that:
...
0
votes
1
answer
33
views
Can't create a data source via config method, can only create via properties
If I only set up the data source via spring.datasource values in application.properties, e.g.:
[email protected]
spring.datasource.driverClassName=net.snowflake.client.jdbc....
0
votes
0
answers
61
views
How can I determine if my service uses a DB connection?
I have a Spring Boot app using Hibernate and Spring Data JPA. In order to manage DB transactions, I use the org.springframework.transaction.annotation.Transactional annotation around services.
In some ...
-2
votes
0
answers
25
views
How to efficiently fetch user avatar from another microservice in Spring Boot? [closed]
I’m building a microservices-based system with order-service and user-service.
Each order is created by a user, and in the order list I want to display the user’s avatar.
Avatars are stored in MinIO.
...
-2
votes
1
answer
35
views
How can I use JPA Repository without RequestMappings [closed]
I am using Java 24, and Spring 3.4.4. I have a local postgres DB
Currently I am trying to call a method that has an @autowired repository
I know the problem is I am using "new" which means ...
0
votes
2
answers
43
views
Child class entity is not deleting in many to many relationship
@Entity
@Table(name = "product")
public class Product implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType....
0
votes
1
answer
42
views
Table is a subclass in a 'SINGLE_TABLE' hierarchy and may not be annotated '@Table'
I have this old Hibernate table in Spring Boot application:
@Entity
@Table(name = "accounts")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Account {
@Id
@Column(...
-1
votes
0
answers
34
views
Can we use Spring Data JPA and Spring JDBC in the same Spring Boot application?
Can we use Spring Data JPA and Spring JDBC in the same Spring Boot application?
Also Let us say we have very complex sql queries written in an old app and we need to migrate them to Spring Boot app. I ...
0
votes
1
answer
35
views
We are migrating from Spring 2.x.x(Hibernate 5) to Spring 3.x.x (Hibernate 6). Test case we using H2. But getting unique key constraint issue
Entity class
@Getter
@Setter
@NoArgsConstructor
@Entity
@ToString
@Table(name = "category_config")
public class CategoryConfig extends BaseEntity {
@Id
@GeneratedValue(strategy = ...
0
votes
0
answers
51
views
Java springboot application does not "see" dependency unless that dependency's plugin is compiled with specific info
I have a Java Springboot application which I have added as a dependency. Lets call this application A. This dependant project is a API making use of controller classes (@RestController annotation). In ...
0
votes
0
answers
42
views
How to let JPA know what it has to do when you configure DataSource manually
I am configuring my spring boot app to have a second datasource for some reason, the main one which is annotated as @Primary looks like this
@Configuration
@EnableJpaRepositories(basePackages = "...
1
vote
3
answers
129
views
Unable to save the model object in the spring boot which is having the enum property
we are using spring boot version 3.4.3 + spring data jpa project
hibernate version 6+ AND spring security version 6+. Databae is postgres.
my model class TestModel is like this:
@Getter
@...
2
votes
1
answer
73
views
Spring Boot and Apache Derby - IllegalStateException: Cannot load driver class: EmbeddedDriver
After verifying with several tutorials and Stack Overflow questions for similar errors, I am not able to solve the below issue.
I want to use Apache Derby DB in embedded mode and below is how I ...
0
votes
0
answers
39
views
When deleting the cart by id, all the cartItems get rovmved correctly, but the cart still holds its data until I add another item to the cart
I'm working on e-commerce APIs, I have this service that is responsible for the cart operation:
@Service
@AllArgsConstructor
public class CartService implements ICartService {
private final ...
0
votes
1
answer
150
views
"A column has been specified more than once in the order by list. Columns in the order by list must be unique" when using ORDER BY
I am using blaze persistence (version 1.6.14) for fetching entities from my database.
An SqlGrammarExcepion is thrown with the message
com.microsoft.sqlserver.jdbc.SQLServerException: A column has ...