Skip to content

Commit

Permalink
endOfUpgradingToSpringBoot2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ranga Rao Karanam authored and Ranga Rao Karanam committed Aug 3, 2017
1 parent 55d3d97 commit e1fcbe1
Show file tree
Hide file tree
Showing 5 changed files with 836 additions and 8 deletions.
26 changes: 21 additions & 5 deletions 02.Spring-Boot-Web-Application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
<version>2.0.0.M3</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand All @@ -34,7 +34,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand All @@ -56,13 +56,13 @@
<artifactId>bootstrap</artifactId>
<version>3.3.6</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap-datepicker</artifactId>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
Expand Down Expand Up @@ -97,4 +97,20 @@
</plugins>
</build>

</project>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestones</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestones</url>
</pluginRepository>
</pluginRepositories>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public String deleteTodo(@RequestParam int id) {

//if(id==1)
//throw new RuntimeException("Something went wrong");
repository.delete(id);
repository.deleteById(id);
//service.deleteTodo(id);
return "redirect:/list-todos";
}

@RequestMapping(value = "/update-todo", method = RequestMethod.GET)
public String showUpdateTodoPage(@RequestParam int id, ModelMap model) {
Todo todo = repository.findOne(id);
Todo todo = repository.findById(id).get();
//Todo todo = service.retrieveTodo(id);
model.put("todo", todo);
return "todo";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%@ include file="common/header.jspf" %>
<%@ include file="common/navigation.jspf" %>
<div class="container">
<form:form method="post" commandName="todo">
<form:form method="post" modelAttribute="todo">
<form:hidden path="id" />
<fieldset class="form-group">
<form:label path="desc">Description</form:label>
Expand Down
Loading

0 comments on commit e1fcbe1

Please sign in to comment.