Questions tagged as 'spring'

0
answers

@ContextConfiguration (classes = {TestContext.class, WebAppContext.class}) Submit an Error: WebAppContext can not be resolved to a type

package com.example.demo.controller; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.cont...
asked by 21.10.2017 / 04:27
1
answer

Unable to call jsp function from jsp using Spring MVC

I have tried various ways to run a javascript from a jsp in a project using Spring MVC, all have failed: Spring MVC - How to include JS or CSS files in a JSP page This is the structure of the project: The index.jsp (specificall...
asked by 22.10.2017 / 06:02
2
answers

Swagger Java Spring Data Mock API

Making a data mock for an API I have found that having the example in the Swagger editor, after executing the project spring generated by Swagger I find that the input of the endpoint is not acceptable. It is a Json and the example autogenerates...
asked by 06.10.2017 / 16:40
1
answer

Why do I get this error when sending JSON from AJAX to JAVA SPRING MVC?

Good, two days ago I'm going crazy with this problem. This object json sent as an example: {"listado": [{"pos":0,"idfact":30,"idprod":1,"idremito":29,"cant":1,"descripadic":"","precio":55,"subtotal":55},{"pos":1,"idfact":30,"idprod":...
asked by 30.09.2017 / 17:04
1
answer

Avoid booting tomcat Spring Boot

Hello I'm starting with Spring Boot (using netbeans as IDE), I'm using the tomcat plugin, and every time I make a modification to the html I have to stop the tomcat and start it again. My query is, what should I configure to avoid this. <?x...
asked by 28.09.2017 / 23:07
1
answer

Ajax with relational entities Spring Boot

I'm working with Spring Boot, AJAX and jQuery. When I make a request and, in the controller, I return entities without relationships, it brings me the data correctly, but when I create binary relations or n-arias errors occur. In the browser...
asked by 30.09.2017 / 22:44
0
answers

Error 'dispatcherServlet' when consuming web service Rest with Spring

Good morning, I have been trying to solve this problem for some time, the problem I have is that I developed an application using Spring, in it I have a web service Rest which at the time of trying to consume I get the following error: Initi...
asked by 20.09.2017 / 15:34
1
answer

What is the correct way to use enum java

How can I use enum as roles to authenticate in a java web app? public enum Role { ROLE_ADMIN,ROLE_USER; } I am using the spring boot framework and thus the roles are valid: @GetMapping("/home") public String defaultAfterLogin(Ht...
asked by 26.09.2017 / 17:07
1
answer

Inheritance management with Spring and JPA

Good morning I need to create a repository "B" from a repository "A" which should no longer be modified. I have some doubts about how to proceed since I am having an ambiguity error on my first attempt. I have my repository A: @Repositor...
asked by 04.07.2017 / 18:39
1
answer

search controller spring

I try to pass 2 parameters from my angle controller, it's a search form with 2 parameters, I'm using jdbcTemplate @RequestMapping(value = "/empleado/buscarEmpleado", method = RequestMethod.POST) public ResponseEntity<Void> bu...
asked by 26.06.2017 / 17:54