Questions tagged as 'spring-jpa'

1
answer

Repository - Records Filter according to user's permission

Searching on how to filter the records with the repository, I found the annotations: @PreAuthorize @PreFilter @PostFilter You have 2 Roles in the system: ROLE_ADMIN and ROLE_USER where ROLE_ADMIN can access all records, ROLE_USER can...
asked by 06.04.2017 / 17:06
0
answers

How to return a MAP using nativeQuery from JPA?

I need to consult a bank that is already created, populated, and maintained by another application. So I do not have the entities in my project and I did not even want to create them. I'm using Spring Boot with JPA. Here is an example code:...
asked by 21.05.2017 / 22:26
1
answer

Use clause "WHERE IN ()" IN SPRING BOOT JPA?

Does anyone know how I can use some clause similar to WHERE IN in spring jpa ? example: @Modifying @Transactional @Query(value = "Delete from table where id in(:ids)",nativeQuery=true) void deleteByIdid(@Param("ids") String...
asked by 18.03.2016 / 18:28
1
answer

Error integrating Spring 4 + Hibernate 5 + JPA 2 and Glassfish

I am not able to start the Spring transaction, it is some configuration that made me wrong who can help me. follow the codes: java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() at org.hibernate.internal.Abst...
asked by 25.02.2018 / 22:24
1
answer

Spring boot modules via maven do not interact

I'm using Spring Boot to create a web service RESTFul and a SOAP, each in a module but both in a single project. So I decided to separate my domain layer into a third module since it is the same for both types of web services and so I could reus...
asked by 23.03.2018 / 14:55
1
answer

When I make a request in my API Rest with Spring boot, it is coming with one more item

I have already debugged and the result is a correct list, but when I make the request in the Postman, there is one more item. Looks like an accountant. Can someone tell me what this is and how to pull it off? Thisismycontroller.importjavax.s...
asked by 30.11.2017 / 02:34
1
answer

Application with Spring Boot does not rise - org.springframework.beans.factory.UnsatisfiedDependencyException

I created the application from SPRING INITIALIZR. I made the adjustments for the first operation and configured the application.properties however I still receive the same exception: 2017-05-24 16:49:23.784 WARN 5568 --- [ main] ati...
asked by 24.05.2017 / 22:14
1
answer

How to map entities with composite keys in JPA?

I have a system where all tables in the database have a column empresa , which is part of PRIMARY KEY . In the client table, I have a column id (autoincrement), which together with empresa form a composite key, mappe...
asked by 09.04.2017 / 23:57
1
answer

Spring XML Error in JPA

After I updated Eclipse from the Luna version to the Mars version it is returning error in the first line of the Spring JPA XML file, in the XML declaration: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframew...
asked by 29.09.2015 / 22:15
0
answers

Spring data Jpa implement generic methods

I have 3 services with these methods in common create() , deleteById() , findAll() , getById() and update() . @Service public class AutorService {create(),deleteById(),findAll(),getById(),update(), etc...} @Servi...
asked by 23.11.2018 / 00:23