Questions tagged as 'spring-mvc'

1
answer

Deleting child records with Spring JPA @ManyToOne annotation

I have the classes Presente and Reserva , as below: @Entity public class Presente { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long codigo; private String nome; //getters e setter omitid...
asked by 28.12.2016 / 23:11
1
answer

Spring + Hibernate

Good morning! I am studying Spring MVC, Maven and Hibernate. In the project structure created with Maven, where do I place the applicationContext.xml file? Thank you.     
asked by 02.02.2017 / 14:42
2
answers

Problem with Spring "No qualifying bean of type found for dependency"

Hello, I'm learning a little about Spring and I'm having a problem that I can not get around in any way. I've been looking for solutions to this mistake for a long time, but I did not find anything that would help. I imagine the annotations are...
asked by 26.09.2016 / 03:00
0
answers

How to select a runtime class based on a RequestParam using Spring MVC?

Let's say I have the following @RestController in my code that uses Spring MVC: @RestController public class Exemplo { @RequestMapping(value = "exemplo", method = RequestMethod.GET) public InterfaceDeExemplo exemplo(@RequestParam String escol...
asked by 02.06.2016 / 12:18
0
answers

Crud with related tables in spring mvc

I'm developing a java application, using spring mvc . And in a CRUD functionality, I have an Incident signup screen. On this screen, I have the fields mapped according to the entity Incident.java. However in the registration screen I have m...
asked by 05.04.2016 / 17:10
1
answer

Maven Spring Project MVC + JPA

I'm new to Spring MVC, I created an Maven sample project for Spring MVC using Hibernate and JPA. I found some problems when setting up persistence.xml but I was not able to use dartasource managed by jboss, I left that aside, now when I try to g...
asked by 13.03.2016 / 22:34
0
answers

Spring MVC Neither BindingResult nor plain target object for bean name 'contract'

I have a "list.jsp" page that renders the list of a certain entity. I was asked to create a search form on this page: <form:form role="form" commandName="contrato" servletRelativeAction="/contrato/search" method="POST"> <div...
asked by 23.03.2016 / 17:11
3
answers

Spring MVC Enum

I would like a help, I'm new to Spring MVC and I'm trying to send a numeral value of an Enum that I have in my class, but I'm not getting it, only the Nominal value is accepted. I would like some help. Thanks Example: public enum TipoCli...
asked by 24.03.2016 / 00:09
0
answers

Redirect to another sub-domain with addition of flash attributes (RedirectAttributes) does not work

My question is related to adding attributes in the RedirectAttributes interface. I'm adding two flash attributes in the redirect, but the redirect does not only change the URI but the subdomain as seen in the method below: @RequestMap...
asked by 23.03.2016 / 15:13
0
answers

Spring MVC - Error 405

I'm trying to upload an application configured with Spring and it's displaying 405 error. Controller: @Controller @RequestMapping(value = "/solicitacaoDeMaterial") public class SolicitacaoMaterialController { @Autowired private...
asked by 26.02.2016 / 13:12