spring-mvc Questions

18

I have model class like this, for hibernate @Entity @Table(name = "user", catalog = "userdb") @JsonIgnoreProperties(ignoreUnknown = true) public class User implements java.io.Serializable { priv...
Southwesterly asked 16/4, 2014 at 6:5

2

Solved

I have an endpoint which receives a JSON through POST request. RequestMapping(value = "/app/login", method = RequestMethod.POST, headers = { "Content-type=application/json" }) @ResponseBody publi...
Goth asked 6/10, 2015 at 13:26

4

Solved

I have a Spring App that uses JPA repositories (CrudRepository interfaces). When I try to test my controller using the new Spring test syntax @WebMvcTest(MyController.class), it fails coz it tries ...
Adrenalin asked 10/10, 2016 at 2:40

17

Solved

I use Spring Boot and included jackson-datatype-jsr310 with Maven: <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</...
Perutz asked 27/10, 2016 at 0:46

2

Solved

I am using Spring MVC .I have to write a service that would take input from the request body, add the data to the pdf and returns the pdf file to the browser. The pdf document is generated using it...
Tseng asked 20/5, 2013 at 15:20

13

Solved

I'm new to Spring Boot and having with error while running my application. I'm following a tutorial and I believe I'm having proper parent and dependencies with POM, please help me main class: p...
Antabuse asked 24/4, 2017 at 3:41

9

I am new to spring. I am developing a REST api with spring webmvc. For Error Handling I got this link http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-ann-rest-s...
Dittman asked 21/6, 2014 at 5:55

32

Solved

I use Ubuntu and installed cURL on it. I want to test my Spring REST application with cURL. I wrote my POST code at the Java side. However, I want to test it with cURL. I am trying to post a JSON d...
Forland asked 24/8, 2011 at 8:51

4

Solved

I am new to spring and spring boot. I tried to build a project by following an example I found here : http://www.javaguides.net/2018/09/spring-mvc-using-spring-boot2-jsp-jpa-hibernate5-mysql-exampl...
Undecided asked 12/8, 2022 at 8:10

3

Solved

Iam calling a stored procedure from my Spring DAO class using JdbcTemplate. My problem is that, stored procedure returns multiple tables. Is there a way to access multiple tables using Spring JdbcT...
Janice asked 18/5, 2011 at 5:47

2

Solved

I have there login parameters 1.userName 2.password 3.companyId I have got user name and password using following code Authentication auth = SecurityContextHolder.getContext().getAuthentica...
Flake asked 24/12, 2013 at 5:55

13

Solved

My Spring-Boot-Mvc-Web application has the following database configuration in application.properties file: spring.datasource.url=jdbc:h2:tcp://localhost/~/pdk spring.datasource.username=sa spring...
Igorot asked 5/1, 2016 at 16:59

20

Solved

I created an application with spring + hibernate, but I always get this error. This is my first application with hibernate, I read some guides but I can not solve this problem. Where am I doing wro...
Consumedly asked 5/10, 2014 at 14:19

9

Solved

I'm trying to secure my website using Spring Security following the guides on the web. So on my server side I have the following classes. My WebSecurityConfigurerAdapter: @Configuration @EnableWebS...
Ammonia asked 19/10, 2013 at 16:18

14

Solved

I'm writing a Spring MVC application deployed on Tomcat. See the following minimal, complete, and verifiable example public class Application extends AbstractAnnotationConfigDispatcherServletInitia...
Kilowatthour asked 10/1, 2017 at 19:53

4

So I am trying to host a Single Page Application alongside a normal REST API with spring. What this means is that all requests that goes to the normal /api/ endpoints should be handled by the resp...
Vedetta asked 25/1, 2019 at 7:56

4

Solved

<select name="showYears"> <#list payrollYears as year> <option value="${year.year}">${year.yeardesc}</option> </#list> </select> i am getting payrollyea...
Clamant asked 4/5, 2011 at 6:37

5

Solved

I'm running into a scenario where I need to define a one-off @FeignClient for a third party API. In this client I'd like to use a custom Jackson ObjectMapper that differs from my @Primary one. I kn...

17

Solved

I'm evaluating Spring MVC & Boot and AngularJs for building web applications. I've run into the problem that when I make modifications to my static content (html, js, css), I have to restart th...
Avisavitaminosis asked 15/7, 2014 at 15:49

2

Solved

I have a spring-boot application. I have no ApplicationContext.xml or web.xml files in my project. I prefer to avoid them and have everything configured in Java code. I have read the following th...

2

Solved

I am trying to use spring social for my REST services and my mobile app. I wonder what the best approach is. I am planning to use linkedin, google login and password authentication inside my mob...

6

Solved

I created a Spring Boot web application that uses Thymeleaf as the template engine. I configured the MessageSource to look for messages in a subfolder: @Bean public MessageSource messageSource() {...
Xantho asked 9/4, 2015 at 7:17

11

Solved

When I deploy my Spring application via Spring Boot and access localhost:8080 I have to authenticate, but what is the username and password or how can I set it? I tried to add this to my tomcat-use...
Onions asked 17/5, 2016 at 19:46

2

I've got a Spring boot application with this security config: @Override protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .headers().frameOptions().sameOrig...
Diffident asked 13/8, 2022 at 19:35

2

Solved

I try to create simple user login and registration page. But I cannot create user using services method. I have a service for creating new user. @Service public class LocalUserDetailsService implem...

© 2022 - 2024 — McMap. All rights reserved.