update to spring 5

This commit is contained in:
Loredana Crusoveanu 2018-07-01 16:30:43 +03:00
parent 92340e9ca5
commit 0cd80319bd
3 changed files with 5 additions and 8 deletions

View File

@ -10,10 +10,10 @@
<description>Intro to Spring Data REST</description> <description>Intro to Spring Data REST</description>
<parent> <parent>
<artifactId>parent-boot-1</artifactId> <artifactId>parent-boot-2</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-1</relativePath> <relativePath>../parent-boot-2</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -3,17 +3,14 @@ package com.baeldung.config;
import com.baeldung.events.AuthorEventHandler; import com.baeldung.events.AuthorEventHandler;
import com.baeldung.events.BookEventHandler; import com.baeldung.events.BookEventHandler;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration @Configuration
@EnableWebMvc @EnableWebMvc
public class MvcConfig extends WebMvcConfigurerAdapter{ public class MvcConfig implements WebMvcConfigurer {
public MvcConfig(){ public MvcConfig(){
super(); super();

View File

@ -38,7 +38,7 @@ public class SpringDataProjectionIntegrationTest {
@Before @Before
public void setup(){ public void setup(){
if(bookRepo.findOne(1L) == null){ if(bookRepo.findById(1L) == null){
Book book = new Book("Animal Farm"); Book book = new Book("Animal Farm");
book.setIsbn("978-1943138425"); book.setIsbn("978-1943138425");
book = bookRepo.save(book); book = bookRepo.save(book);