Questions tagged as 'spring'

2
answers

Create bidirectional relationship without using DTO?

Hello, I'm in a project and I need to do bidirectional relationship between two entities, the relationship is @OneToMany @ManyToOne , so far so good. But I wonder if there is any way to do it without using DTO? @Entity public class An...
asked by 01.07.2016 / 16:53
0
answers

Spring Web MVC - Controller not working

I'm trying to make a basic application, with a controller that sends a message to the screen and put CSS in the project, but either the CSS works or the controller. Here are the codes:  1) NetBeans Projects \ SpringMVC \ web \ WEB-INF \ dispat...
asked by 09.06.2016 / 17:43
0
answers

Java Spring MVC error 400 - Search for 2 fields

Galera, blz?! Next, I'm finalizing a project for college completion and I'm getting a very strange error. I already analyzed with another class friend, but we could not identify. I need to search for two fields, one field per title, and an...
asked by 10.06.2016 / 06:01
0
answers

@Retryable and @Async with spring

Is it possible to create an asynchronous method that can be retried if there is any exception with spring? @Retryable @Async public void myMethod() throws Exception { // Do some stuff }     
asked by 25.03.2016 / 00:01
1
answer

Error injecting Service into an @component

Set an example bean: @Component public class SimulationModelFactory { and within the class I'm injecting my service example: @Autowired private SimulationFlowService simulationFlowService; Service always gets null     
asked by 09.03.2016 / 18:44
0
answers

[jersey-servlet]: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes

I'm trying to upload application in WAS 8.5, however I'm taking this error when deploying, and with that the application does not run. WEB.XML <servlet> <servlet-name>jersey-servlet</servlet-name> <servlet-cla...
asked by 28.10.2015 / 12:42
0
answers

Error while running Maven's Tomcat

I am giving a studied in Spring used Maven, when trying to run Tomcat with the command mvn tomcat:run gives an error that does not happen when I squeeze it in Tomcat7 configured in Eclipse. The error is this: GRAVE: Servlet /sprin...
asked by 27.09.2015 / 04:05
1
answer

Problem with rest controller in Spring

I configured Spring 4 to work without xml. I created a simple @RestController , like this: @RestController public class JogadorRest { @RequestMapping("/ola/{jogador}") public Jogador message(@PathVariable String jogador) {...
asked by 28.08.2015 / 16:17
0
answers

HTTP Error Status 404 - The requested resource is not available in Spring MVC

I've tried several ways to solve this problem, but when I click on the controller to access the url it's error. Follow the files Controller package com.br.maco.controller; import org.springframework.stereotype.Controller; import org.spri...
asked by 28.07.2015 / 15:56
0
answers

Saving objects with jpa in transaction with spring

Hello, I have a problem in the application that I work with when I persist the object in the database. I see the jboss log shows the insert statement plus the id of the object continues to be null. Not updated. How do I avoid this? Forcing the f...
asked by 05.08.2015 / 19:34