Skip to content

Commit 460e4d1

Browse files
committed
remove redundant code and use java 6
1 parent 33b97d6 commit 460e4d1

File tree

5 files changed

+10
-211
lines changed

5 files changed

+10
-211
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<packaging>war</packaging>
99
<version>1.0.0-BUILD-SNAPSHOT</version>
1010
<properties>
11-
<java-version>1.8</java-version>
11+
<java-version>1.6</java-version>
1212
<org.springframework-version>4.0.6.RELEASE</org.springframework-version>
1313
<org.aspectj-version>1.6.10</org.aspectj-version>
1414
<org.slf4j-version>1.6.6</org.slf4j-version>
@@ -159,8 +159,8 @@
159159
<artifactId>maven-compiler-plugin</artifactId>
160160
<version>2.5.1</version>
161161
<configuration>
162-
<source>1.8</source>
163-
<target>1.8</target>
162+
<source>1.6</source>
163+
<target>1.6</target>
164164
<compilerArgument>-Xlint:all</compilerArgument>
165165
<showWarnings>true</showWarnings>
166166
<showDeprecation>true</showDeprecation>

src/main/java/org/phstudy/sample/controller/HomeController.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,19 @@ public String home(Locale locale, Model model) {
7676

7777
@RequestMapping(value = "/httpservletrequest", method = RequestMethod.GET)
7878
public String httpservletrequest(Locale locale, Model model) {
79-
return "httpservletrequest";
79+
model.addAttribute("url", "./rest/book2");
80+
return "book";
8081
}
8182

8283
@RequestMapping(value = "/pageable", method = RequestMethod.GET)
8384
public String pageable(Locale locale, Model model) {
84-
return "pageable";
85+
model.addAttribute("url", "./rest/book1");
86+
return "book";
8587
}
8688

8789
@RequestMapping(value = "/requestparam", method = RequestMethod.GET)
8890
public String requestparam(Locale locale, Model model) {
89-
return "requestparam";
91+
model.addAttribute("url", "./rest/book3");
92+
return "book";
9093
}
9194
}

src/main/webapp/WEB-INF/views/requestparam.jsp renamed to src/main/webapp/WEB-INF/views/book.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
7070
var refreshTable = function(query, page) {
7171
$.ajax({
72-
url: './rest/book3?query=' + query + '&page=' + (page - 1),
72+
url: '${url}?query=' + query + '&page=' + (page - 1),
7373
type: "GET",
7474
dataType: 'json'
7575
}).success(function(data) {

src/main/webapp/WEB-INF/views/httpservletrequest.jsp

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/main/webapp/WEB-INF/views/pageable.jsp

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)