spring-mvc Questions
4
Solved
In which tier should the validation be in a Spring Boot Rest API. I have some models, endpoints and DTOs. I added some @NotNull and @Size annotations in the DTO. I added the @Valid annotation in th...
Judges asked 16/2, 2017 at 17:4
16
Solved
Using the curl command:
curl -u 591bf65f50057469f10b5fd9:0cf17f9b03d056ds0e11e48497e506a2 https://backend.tdk.com/api/devicetypes/59147fd79e93s12e61499ffe/messages
I am getting a JSON response:
...
Gramnegative asked 25/5, 2017 at 8:55
5
Solved
spring-boot-starter-webflux (Spring Boot v2.0.0.M2) is already configured like in a spring-boot-starter-web to serve static content in the static folder in resources. But it doesn't forward to inde...
Butterfish asked 17/7, 2017 at 14:47
10
Solved
Spring Boot ConflictingBeanDefinitionException: Annotation-specified bean name for @Controller class
I keep getting the ConflictingBeanDefinitionException error in my Spring boot application. I am not entirely sure as to how to address it, I have several @Configuration annotated classes helping to...
Driftwood asked 13/2, 2015 at 11:10
4
Solved
I am learning Spring MVC and trying to connect IntelliJ IDEA to Tomcat Server. So far I have downloaded the Tomcat 10 tar.gz package from the Tomcat website, extracted and put it at the following l...
Thatch asked 27/2, 2020 at 18:36
5
Solved
How can I tell MockRestServiceServer to expect a specific json content during a junit @Test?
I thought I could expect just a json string as follows:
.andExpect(content().json(...)), but that metho...
Karisakarissa asked 14/3, 2018 at 16:35
5
Solved
I am trying to test a method that posts an object to the database using Spring's MockMVC framework. I've constructed the test as follows:
@Test
public void testInsertObject() throws Exception {
...
Exaggerative asked 10/12, 2013 at 20:20
5
Solved
I'm trying to run entityManager.merge(myEntity) within the following method but it seems that the @Transactional annotation is ignored. The Hibernate configuration seems to be fine because I can su...
Mufi asked 22/8, 2015 at 13:24
4
I'm using spring Pageable data and objects. When sorting by a field that can have the same values in database, changing page retrieves erroneous results.
I'm trying to add default order by id with...
Flivver asked 11/4, 2016 at 15:3
7
Solved
I am handling REST exceptions using @ControllerAdvice and ResponseEntityExceptionHandler in a spring Rest webservice. So far everything was working fine until I decided to add the URI path(for whic...
Isometropia asked 19/8, 2018 at 20:34
3
I want to create a web application that allow users to upload their image to the server. When they click send, their image will be uploaded to the server (multipart). Before saving, I want to make ...
Lacour asked 12/4, 2013 at 18:53
6
Solved
I have a simple @Controller within a spring-mvc environment. This is the Controller:
@Controller
public class MessageController {
private static Logger LOG = LoggerFactory
.getLogger(MessageCont...
Crevice asked 15/3, 2014 at 8:30
4
Solved
I heard that controller belongs to the presentation layer. How is it possible?
I thought that :
view is for presentation
model is for business logic
controller is for controlling logic
Is ther...
Fussbudget asked 14/9, 2012 at 18:4
5
Solved
I'm new in Spring Boot, I'm trying to build a simple application with REST Api, and I'm getting this error immediately when starting the app:
Error starting ApplicationContext. To display the condi...
Discordant asked 24/1, 2021 at 18:20
6
Solved
I am creating a spring boot application using MS SQL server. I have a requirement where I need to initialize USERS table in user_database database using data.sql file placed in /src/main/resources/...
Macadamia asked 3/2, 2018 at 11:21
6
Solved
My REST client uses RestTemplate to obtain a List of objects.
ResponseEntitiy<List> res = restTemplate.postForEntity(getUrl(), myDTO, List.class);
Now I want to use the list returned and r...
Danseuse asked 18/8, 2014 at 1:25
3
There is a sample spring boot(version 3.0.3) web application like this:
The part of pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-s...
Normand asked 26/2, 2023 at 12:53
33
Solved
I have a program which runs as a Spring boot App in eclipse. The program was running fine. Then i did the following:
Right click on project -> Run As -> Maven Test .
This was accidental. When i t...
Stoddard asked 11/2, 2015 at 9:47
3
I am experiencing what I consider a strange behaviour for a Java application. I am using Spring Boot 1.4.1 to develop a REST Service. Due to a bug in my code, an invocation to the service results i...
Sanmiguel asked 23/2, 2017 at 16:30
56
I used maven to do the tutorial https://spring.io/guides/gs/uploading-files/
All the codes I used was copied.
The Application can run, but I get the error:
Whitelabel Error Page This applicatio...
Puckery asked 30/6, 2015 at 9:22
4
I am newbie to spring-data-rest. In my Application when i make a rest call i am getting json which consist on self-links and links to foreign key tables. But i want json instead on links. I generat...
Tetralogy asked 26/3, 2015 at 8:38
7
I am using spring 3.0.5 version of RestTemplate
Can any one help me .how to set connecttimeout and readTimeout values for each request
but in latest versions there is a solution with HttpComponen...
Freesia asked 14/4, 2015 at 6:46
5
My build.gradle contains:
compile('org.springframework.security:spring-security-web:4.1.3.RELEASE')
Did a "refresh all gradle projects" (im using IntelliJ!)
When i want to extend WebSecurityCon...
Ratha asked 12/10, 2016 at 14:13
10
We are working on a Spring Boot web application, and the database we are using is MySQL;
the setup we have is we first test it locally (means we need to install MySQL on our PC);
then we push to ...
Wrongdoing asked 21/2, 2016 at 2:39
8
Solved
I have a problem with my CountryServiceImpl,when I want realize method findOne in CountryServiceImpl it tells me "Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'ua...
Capitulate asked 3/10, 2018 at 19:27
© 2022 - 2024 — McMap. All rights reserved.