Commit 1a61bfe4 authored by Eduardo Macarron's avatar Eduardo Macarron

[jpetstore6] code format

parent b876c834
Follow the next steps to run the sample on Tomcat 7.0
- Install Eclipse
- Run Eclipse
- Add m2eclipse plugin to Eclipse (maven)
- Add subclipse plugin to Eclipse (subversion)
- Download and unzip Tomcat 7
- In SVN add a new repository http://mybatis.googlecode.com/svn
- In SVN go to sub-projects/jpetstore-6/trunk/
- Mouse right click and select "Check out as Maven project"
- Go to projects. Right click on JPetStore project and select "run on server"
- Select Tomcat 7 Server and set your installation directory
- JPetStore home page should be shown
\ No newline at end of file
package org.mybatis.jpetstore.domain;
//import com.ibatis.common.util.PaginatedArrayList;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
......@@ -13,6 +12,7 @@ import java.util.Map;
public class Cart implements Serializable {
private static final long serialVersionUID = 8329559983943337176L;
private final Map<String, CartItem> itemMap = Collections.synchronizedMap(new HashMap<String, CartItem>());
private final List<CartItem> itemList = new ArrayList<CartItem>();
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
public class CartItem implements Serializable {
private static final long serialVersionUID = 6620528781626504362L;
private Item item;
......
......@@ -5,6 +5,7 @@ import java.io.Serializable;
public class Product implements Serializable {
private static final long serialVersionUID = -7492639752670189553L;
private String productId;
private String categoryId;
private String name;
......
......@@ -48,7 +48,7 @@
<!-- enable transaction demarcation with annotations -->
<tx:annotation-driven />
<!-- define the SqlSessionFactory, notice that configLocation is not needed when you use MapperFactoryBean -->
<!-- define the SqlSessionFactory -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:mybatis-config.xml" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment