Migrated modules using parent-spring-5:

ethereum
persistence-modules/spring-data-elasticsearch
persistence-modules/spring-data-mongodb
spring-dispatcher-servlet
spring-mvc-forms-jsp
spring-mvc-java
This commit is contained in:
geroza
2019-01-09 12:23:10 -02:00
parent 39bfa04d11
commit 1ca15e5919
43 changed files with 366 additions and 52 deletions

View File

@@ -60,17 +60,4 @@ public class CompanyController {
result.put("name", name);
return new ResponseEntity<>(result, HttpStatus.OK);
}
@RequestMapping(value = "/companyResponseBody", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public Company getCompanyResponseBody() {
final Company company = new Company(2, "ABC");
return company;
}
@RequestMapping(value = "/companyResponseEntity", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Company> getCompanyResponseEntity() {
final Company company = new Company(3, "123");
return new ResponseEntity<Company>(company, HttpStatus.OK);
}
}

View File

@@ -1,13 +0,0 @@
package com.baeldung.web.controller.advice;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice;
@ControllerAdvice
public class JsonpControllerAdvice extends AbstractJsonpResponseBodyAdvice {
public JsonpControllerAdvice() {
super("callback");
}
}

View File

@@ -1,15 +1,10 @@
package com.baeldung.config;
import com.baeldung.web.controller.handlermapping.BeanNameHandlerMappingController;
import com.baeldung.web.controller.handlermapping.SimpleUrlMappingController;
import com.baeldung.web.controller.handlermapping.WelcomeController;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import java.util.HashMap;
import java.util.Map;
import com.baeldung.web.controller.handlermapping.BeanNameHandlerMappingController;
import com.baeldung.web.controller.handlermapping.WelcomeController;
@Configuration

View File

@@ -9,7 +9,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.spring4.view.ThymeleafViewResolver;
import org.thymeleaf.templateresolver.ServletContextTemplateResolver;

View File

@@ -1,6 +1,5 @@
package com.baeldung.web.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

View File

@@ -20,7 +20,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.baeldung.spring.web.config.WebConfig;
import com.baeldung.spring.web.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)