Questions tagged as 'spring-mvc'

1
answer

Delete Oracle - Api Web

I'm trying to make this springboot code, turn a code into WebApi @RequestMapping("/deletarEvento") public String deletarEvento(long codigo) { Evento evento = er.findByCodigo(codigo); er.delete(evento); return "redir...
asked by 26.05.2018 / 19:19
0
answers

Problem performing a test with POST method

I'm trying to run a unit test of the post method, but the system returns the expected status but was < 404 & gt ;. If I use postaman with Json that I'm creating in Java, it returns the status 200 (OK) Test Class @RunWith(SpringRunner....
asked by 15.05.2018 / 16:27
2
answers

Understand the use of generics in an abstract class DAO Hibernate

Hello, I'm starting to develop a web application with spring + hibernate framework, I started with an example that contained the following class: import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.SessionFacto...
asked by 24.04.2018 / 22:10
0
answers

Application Multi-tenancy Spring-mvc

Good evening guys, I've been trying to develop a multi-tenancy application with spring mvc for two weeks, but I only think spring boot, but without success. I wonder if anyone can help me. I want to make an application using spring-mvc where I c...
asked by 07.04.2018 / 06:49
1
answer

Problems with friendly url in spring mvc

Including a last page in my project I got a url problem, of which I could not identify the problem. JSF Scenario: Module Condition: href="customer service" Customer Details: href="client / $ {nrPasta}" Module Condition: href="customer...
asked by 16.03.2018 / 13:25
3
answers

How to limit a user to only accessing their own data? [closed]

I'm developing a task list application for study, however, all users access all tasks. I wonder if anyone has implemented something like Spring Security and how they did it.     
asked by 07.03.2018 / 15:34
1
answer

Creating EJBs in Spring MVC project - Problems with Dependency Injection

I have a Java application with Spring MVC that is divided into modules as follows. proj_servicos = Mapped entities, Repository (communication with the bank) and Services (Where Repository is injected) classes. Location where persis...
asked by 15.12.2017 / 13:01
0
answers

How to include prelude.jspf in java config spring boot

I'm migrating a Spring MVC 3 application to Spring boot, this application had its web.xml with the prelude.jspf configuration where it contained all JSTL imports from jsps. I want to migrate this configuration from xml to java config but found n...
asked by 20.12.2017 / 12:04
0
answers

what should @PreAuthorize do?

I am creating a simple crud with spring-mcv and spring-security . Everything is running perfectly spring-security.xml <b:bean id="handlerWeb1" class="org.springframework.security.web.access.expression.Def...
asked by 20.10.2017 / 22:50
1
answer

How to redirect request when @PreAuthorize returns false

I'm learning about Spring MVC and Spring Security . How do I redirect the page when the next line returns false within a @Controller ? @PostAuthorize(" hasRole('page')") If the above line returns true the...
asked by 22.10.2017 / 03:57