Questions tagged as 'spring-data'

1
answer

Requests for API Rest

The application uses Spring Rest in which the paths of a CRUD are generated automatically for each entity, I have the Vehicle, Contact and Agency entities and each one with its respective repository. Vehicle has as an attribute an Agency li...
asked by 14.07.2015 / 17:20
2
answers

Doubt how to configure Spring Data with Hibernate

How to configure Spring Data + hibernate Hello everyone, I'm new here in stackoverflow and also in developing java Web. I'm learning some Spring Frame stuff and am wondering how I can set up Spring Data in my Dynamic Project. Below is...
asked by 24.08.2014 / 16:42
1
answer

Notes for controllers and services

In Spring 3 there are annotations of class @Component , @Service , @Controller and @Repository . I know that @Component is the only one that can be used in all cases ( Controller , Service and Repository )....
asked by 11.12.2013 / 17:23
2
answers

Multiple persistence units with Spring Data

Is it possible to create multiple persistences units by connecting to different databases in the same JPA application using Spring Data? For example. I have an application that will run on MySQL normally. However, it will have to query in an O...
asked by 15.01.2015 / 13:24
3
answers

What kind of return from a select count (*) in Spring JPA?

I need to know the type of return that Spring JPA returns to put in the Service package, because it is giving NullPointerException : Dao: public interface PlaylistDao extends JpaRepository<Playlist, Long> { @Query("select co...
asked by 23.11.2018 / 18:47
2
answers

Is it possible to use native query + spring data to do pagination?

I need to do a paging using dynamic queries because I have to do many joins, I'm trying to make only a select * to test the use of the native query + spring data, but the error message is as follows: Cannot use native queries with dynami...
asked by 10.11.2017 / 16:50
0
answers

Two different bases with spring data jpa

Good evening Would anyone have any examples of Spring Data Jpa with two different bases? Ex: Postgres and SQLServer in the same application? I have a system I need to consult a legacy database. Searching I found an example I followed. I...
asked by 07.11.2017 / 01:44
2
answers

Using the JPA repository

Last Saturday I presented my CBT in college and saw that I need to improve the project presented. The system receives invoices in XML format and handles them. I took as a base the system in the company where I do internship. It uses Prime...
asked by 04.02.2014 / 16:29
3
answers

Spring Data JPA does not recognize the SQL 'Limit' command?

I'm creating a REST API, using Spring Boot, which, using data from a table, displays random phrases. Giving a Google, I discovered that it is possible to generate random results through pure SQL: SELECT <coluna> FROM <tabela> OR...
asked by 31.10.2018 / 06:21
1
answer

Spring Model 4.3.1

I do not know how to work 100% with #POST and #GET yet, my problem should be in understanding how requests occur and when my objects are instantiated. Here are methods: CaixaOperacaoController.java @Controller @RequestMapping("/caixa") public...
asked by 07.08.2018 / 14:37