Questions tagged as 'spring'

1
answer

Validation of input triggering error 400 with Spring MVC

Personal, there is a boring error in which I'm losing sleep to find out how to treat. Well, every time I run my test by checking the validation of my field a 400 error is triggered. I do not know how I can resolve this. The server log does...
asked by 19.08.2014 / 00:38
1
answer

SimpleJaxWsServiceExporter - BaseAddress

I created a Web Service with JAX-WS and used Spring to put it online and also to decrease the use of XML. Problem is that when I declare the SimpleJaxWsServiceExporter in the Spring configuration file I have to put the baseAddress attribute that...
asked by 28.08.2014 / 15:35
0
answers

Object Linking

I'm developing an application and I came across the following "problem": @RequestMapping("/pagamentos") public ModelAndView pagamentos(FormaPagamento pagamento){ ModelAndView model = new ModelAndView("cadastro-pagametos");...
asked by 20.12.2018 / 11:41
0
answers

Thymeleaf Dynamic flaps

I have a list of stores when the address is the same I would like one side of the other as it is and if the address is different it is listed one underneath the other. How could he do that? followthecodebelow<form><ulclass="nav nav-...
asked by 17.12.2018 / 20:39
0
answers

How do I test this Spring MVC method with JUnit? [closed]

Hello, I need help to create a JUnit test class for the Spring method below. @Controller public class ControllerFuncionario { @RequestMapping("/index") public String index(Funcionario funcionario, Project pro, Model model) {...
asked by 24.12.2018 / 13:37
1
answer

Persistence with Spring and Thymeleaf in multiple tables in the same form

I have another vision How can I pass two objects in the ModelAndView so that when calling a save request, I can do this distribution of objects for each Entyti. I have Entyti Client and Contact, in page I need to save the past values, bein...
asked by 03.12.2018 / 19:31
1
answer

Querying in more than 1 field with FindBy in spring mvc

I have this repository: public interface RepositorioUsuarioPermissao extends JpaRepository<UsuarioPermissao, Long> { @Query("SELECT u FROM UsuarioPermissao u WHERE u.id_seletivo = ?1 and u.id_usuario = ?2") List<UsuarioPermis...
asked by 28.11.2018 / 14:01
1
answer

2 form on the same page with Spring mvc, Thymeleaf, does anyone know how?

This registration form for Physician, so I created this modal for the user to register specialties. @GetMapping("/cadastro") public ModelAndView preSalvar(@ModelAttribute("medico") Medico medico,@ModelAttribute Especialidade especialidade){...
asked by 03.12.2018 / 01:37
1
answer

How do I retune the amount of Spring JPA records? [duplicate]

I want to return the value of playlists records in the database, but that code did not work. public interface PlaylistDao extends JpaRepository<Playlist, Long> { @Query("select count(*) from Playlist") public int verifi...
asked by 20.11.2018 / 17:04
0
answers

Spring MVC I Error in JPA EntityManager

Hello, the code below is giving error: import javax.persistence.EntityManagerFactory; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.jpa.Jp...
asked by 18.11.2018 / 03:02