Skip to content

Commit dc5767d

Browse files
committed
correct CLI instructions and add readme
1 parent f8b8d69 commit dc5767d

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Spring MVC and Hibernate template application
2+
3+
This is a template for a web application that uses Spring MVC and Hibernate. The sample code is a simple CRUD page that manipulates records for a single model object.
4+
5+
## Running the application locally
6+
7+
First build with:
8+
9+
$mvn clean install
10+
11+
Then run it with:
12+
13+
$java -jar target/dependency/webapp-runner.jar target/*.war
14+

src/main/webapp/index.jsp

+6-6
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ Authentication successful.</pre>
289289

290290
<h2>Step 4. Makes some changes to the app</h2>
291291
<ol>
292-
<li><script>document.write("<code>cd " + appname() + "</code>")</script></li>
293-
<li>Open <code>src/main/java/HelloServlet.java</code> with your favorite editor</li>
294-
<li>Modify line 20 with:
295-
<code>
296-
out.write("Deployed first change!".getBytes());
297-
</code>
292+
<li>Open <code>src/main/java/com/example/PersonServiceImpl.java in your favorite editor</code></li>
293+
<li>Query the people in alphabetical order by replacing line 29 with the following two lines:
294+
<pre class="once language-java">
295+
Root&lt;Person&gt; from = c.from(Person.class);
296+
c.orderBy(em.getCriteriaBuilder().asc(from.get("lastName")));
297+
</pre>
298298
</li>
299299
</ol>
300300

0 commit comments

Comments
 (0)