Skip to content

Commit 9c82a74

Browse files
authored
Merge pull request eugenp#4603 from eugenp/spring-rest-update
update to spring 5
2 parents d148e78 + 0cd8031 commit 9c82a74

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎spring-data-rest/pom.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<description>Intro to Spring Data REST</description>
1111

1212
<parent>
13-
<artifactId>parent-boot-1</artifactId>
13+
<artifactId>parent-boot-2</artifactId>
1414
<groupId>com.baeldung</groupId>
1515
<version>0.0.1-SNAPSHOT</version>
16-
<relativePath>../parent-boot-1</relativePath>
16+
<relativePath>../parent-boot-2</relativePath>
1717
</parent>
1818

1919
<dependencies>

‎spring-data-rest/src/main/java/com/baeldung/config/MvcConfig.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
import com.baeldung.events.AuthorEventHandler;
44
import com.baeldung.events.BookEventHandler;
55
import org.springframework.context.annotation.Bean;
6-
import org.springframework.context.annotation.ComponentScan;
76
import org.springframework.context.annotation.Configuration;
8-
import org.springframework.web.servlet.ViewResolver;
97
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
108
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
11-
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
12-
import org.springframework.web.servlet.view.InternalResourceViewResolver;
9+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
1310

1411
@Configuration
1512
@EnableWebMvc
16-
public class MvcConfig extends WebMvcConfigurerAdapter{
13+
public class MvcConfig implements WebMvcConfigurer {
1714

1815
public MvcConfig(){
1916
super();

‎spring-data-rest/src/test/java/com/baeldung/projection/SpringDataProjectionIntegrationTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class SpringDataProjectionIntegrationTest {
3838

3939
@Before
4040
public void setup(){
41-
if(bookRepo.findOne(1L) == null){
41+
if(bookRepo.findById(1L) == null){
4242
Book book = new Book("Animal Farm");
4343
book.setIsbn("978-1943138425");
4444
book = bookRepo.save(book);

0 commit comments

Comments
 (0)