Questions tagged as 'spring'

1
answer

Constructor threw exception; nested exception is java.lang.NullPointerException

I am trying to connect to my DB by MySQL pe I get that error of Constructor threw exception; nested exception is java.lang.NullPointerException and do not access any parameter: jdbc.driverClassName = com.mysql.jdbc.D...
asked by 20.08.2018 / 18:09
0
answers

Error controlling the error message

I am creating an error in the controller with Spring and it turns out that when I return the request with Postman it gives me an error of "N". Unexpected 'N' The code that I have below: @RestController public class CustomerController {...
asked by 17.08.2018 / 23:10
1
answer

How can I translate the incoming data from a database with thymeleaf?

I have the following table, and I need the data in the contract_type field to be displayed as pasante or empleado which are saved as intern and employee respectively. thanks in advance. <th:block th:each="...
asked by 10.08.2018 / 17:18
1
answer

java.sql.SQLException: No suitable driver found for jdbc: mysql // localhost: 3306 / rch Spring MVC [duplicate]

Hello, I hope and someone can help me. I have a mysql connection problem with spring mvc and weblogic. The exception thrown at me is the following.         Caused by: java.sql.SQLException: Not suitable driver found for jdbc: mysql // lo...
asked by 05.08.2018 / 01:48
0
answers

How can I bring the 'data' from my db filtering by a person's id?

Good I have a table personas with a relation oneToMany , and another table personemergencycontacts , that is, a person can have many emergency contacts, the question is that in the modal of contactos de emergencia...
asked by 06.08.2018 / 18:12
1
answer

Optimize the response of a service in an Api-Rest with Spring Boot

Good day, I am currently developing an api rest with Spring Boot :: (v1.5.9.RELEASE) to control the handling of a table called File, which persists with other entities, The driver to call the service is the following: @RestContro...
asked by 26.07.2018 / 02:15
0
answers

Obtain an entity, assign it and save it again

I have a system where I have users and each one can have several roles. @Entity @Table( uniqueConstraints= @UniqueConstraint(columnNames={"username"}) ) public class CustomUser implements UserDetails { private stati...
asked by 20.07.2018 / 05:15
0
answers

How to improve unit test with junit? Help

I have the following method in my controller that sends a call to a prop class to manage the file download ArchivoUtils.generaArchivo(response, factList); @RequestMapping(value="view/obtieneArchivo") public void obtieneArchivo(...
asked by 10.07.2018 / 04:52
1
answer

Send js list to a Spring Java controller

I hope to receive a list in my controller that is sent by ajax , in Java but I get an error:    Non-type collection, that is, it does not match. Any other way to stop it? JavaScript var itms = []; for (i = 1; i < 10; i++) {...
asked by 03.07.2018 / 18:10
0
answers

Because I have this error in Spring

I'm new to Spring, I'm trying to deploy a Spring app in glassfish but I have not been able to because I always get this error. I know Catalina is from Tomcat but I do not understand why she names it, I want to use Glassfish, I do not un...
asked by 27.06.2018 / 08:27