Questions tagged as 'spring-mvc'

1
answer

NullPointerException on method return

I am making a method to fetch the logged-in user from the database. I'm having a NullPointerException in return of this method @RequestMapping(value = "/usuarioLogado", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestM...
asked by 18.10.2017 / 16:58
1
answer

Block navigation until validate token login, using Spring, AngularJS and JavaScript

I have a question .. I've implemented a login validation using JWT. It works fine, it generates the token within the requests. However, in the login page, if in the URL I put the next page the system lets go. Login COntroller @RestControlle...
asked by 18.09.2017 / 20:20
0
answers

Connect to the database dynamically by the repository class of the Spring project

I need to connect to the database dynamically, where the database connection data can be passed by parameter, below is a sketch of how I need to connect and execute the query. This code sketch below does not work when I run on my server....
asked by 02.08.2017 / 23:03
1
answer

Spring XML location in a Maven project

In a Maven project, where do I put the Spring file, spring-context.xml ?     
asked by 04.05.2017 / 18:39
1
answer

API Architecture RestFul

I'm building a RESTFul API with spring MVC and I have 2 non-functional requirements that I'm not understanding how to attack them. The API must support 100 requests per second; The API should integration failures between the APIs, not leav...
asked by 04.05.2017 / 03:05
0
answers

Download .xls file in Spring with POST

Galera, To download a file in Spring, I'm using the GET method. @RequestMapping(value = "/exportar/{tipo}", method = RequestMethod.GET) @ResponseBody public void exportar(HttpServletResponse response,@PathVariable TipoEnum tipo) throws IOEx...
asked by 24.04.2017 / 14:58
1
answer

Why is the HTTP Status 404 error occurring in my JBoss Tomcat 7 + Spring MVC application?

I'm doing some tests with MVC JBoss 7 + Spring , and locally it runs, but when I put it in the cloud it generates the error HTTP Status 404 . Folder organization: /pswebproj/src/main/java/pswebproj/control/HelloContro...
asked by 06.04.2017 / 02:45
1
answer

Bug when starting tomcat

Good evening guys, I started to study the book of the code house, spring mvc, but soon I faced the following error when trying to start the tom cat, can anyone help? jan 23, 2017 9:19:31 PM org.apache.tomcat.util.digester.SetPropertiesRule...
asked by 24.01.2017 / 00:25
0
answers

ModelAndView object change with Ajax

@GetMapping("/cadastrarProduto") public ModelAndView cadastrarProduto() { modelAndView = new ModelAndView("pages/index"); addObject("produtoEntity", new ProdutoEntity()); modelAndView; } Is it possible with ajax to change the...
asked by 11.01.2017 / 12:47
1
answer

Error trying to call Controller through View - SpringMVC

I'm developing a system using SpringMVC, when trying to make a call to the controller using the "s: mvcUrl" statement in the JSP the HTTP 404 error is displayed. I noticed that spring does not transform the "s: mvcUrl" statement into html....
asked by 28.12.2016 / 13:21