Questions tagged as 'spring-mvc'

2
answers

Difference between annotations @Component, @Repository and @Service in Spring?

The previous entries are very related, so my questions are as follows: 1- Can the annotations @Component, @Repository and @Service be used interchangeably in Spring or do they provide any particular functionality besides...
asked by 21.06.2018 / 02:49
1
answer

What is the benefit of using interfaces for services in Spring MVC?

Suppose I have the following JPA repository: public interface IGreetingRepository extends JpaRepository<Greeting, Long> { } And according to the documentation I would have to generate a service interface as follows: public interface...
asked by 29.12.2015 / 00:38
1
answer

Differences between Spring boot and Spring MVC [closed]

I see that when executing a Spring boot application raises a server in 8080, I would like to know what is the difference between these two aspects, with a clear example maybe.     
asked by 17.11.2017 / 16:45
1
answer

Return Object JSON in Java

I have a layer repository in my application Java that has a method to return all the authors: public Stream<Author> getAllAuthors() { return StreamSupport.stream(authorRepository.findAll().spliterator(), true); } A...
asked by 27.07.2018 / 17:08
0
answers

How to inject EJB3 in spring mvc?

I would like to know how to integrate ejb3 with spring mvc. I tried to do it by writing @EJB on the controller using the lookup attribute of the @EJB annotation and it still does not work. Thank you very much for replying, greetings. business...
asked by 28.08.2018 / 11:44
4
answers

show query result Spring java in the view

Vista: <body> <p>Hola bienvenido</p> <c:forEach items="${datos}" var="dato"> <c:out value="${dato.ID}"/> </c:forEach> </body> Connector: (the connection works) public Drive...
asked by 01.04.2017 / 05:35
1
answer

Problem with Spring Security and AngularJS

I'm trying to set up my site so that I skip the login in a view in AngularJS (my view in angle is called /validate#/validateusername/ ) but I could not get it, any suggestions on how I can achieve this? @Autowired public void configureGl...
asked by 29.01.2016 / 23:54
2
answers

What is the difference between return "view" and return "redirect: view" in a POST method for Spring MVC?

What happens is that I have a jsp view from which I fill a form, I send the data by means of the POST method to my controller and once the instructions are finished I return to the main view of my site. However, the methods contained in my dri...
asked by 24.02.2016 / 18:49
3
answers

Check that read-only fields have not been modified

I am using spring-mvc and I have a form in a jsp, in this form there are fields that are read only, imagine that we have to make a payment and a field is the amount, I would like to know how I can do to verify that the read-only fields have not...
asked by 06.03.2017 / 20:44
1
answer

How to leave by default that hibernate does not interfere with the serial type Id of postgresql?

I have a field ID in PostgreSQL of type serial , to be auto-incremental. But when I do the mapping with Hibernate the .xml of the table is saved like this: '<class name="Model.Persona" table="persona" schema="public" o...
asked by 14.12.2018 / 22:02