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; package org.mybatis.jpetstore.domain;
//import com.ibatis.common.util.PaginatedArrayList;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -13,6 +12,7 @@ import java.util.Map; ...@@ -13,6 +12,7 @@ import java.util.Map;
public class Cart implements Serializable { public class Cart implements Serializable {
private static final long serialVersionUID = 8329559983943337176L; private static final long serialVersionUID = 8329559983943337176L;
private final Map<String, CartItem> itemMap = Collections.synchronizedMap(new HashMap<String, CartItem>()); private final Map<String, CartItem> itemMap = Collections.synchronizedMap(new HashMap<String, CartItem>());
private final List<CartItem> itemList = new ArrayList<CartItem>(); private final List<CartItem> itemList = new ArrayList<CartItem>();
......
...@@ -4,6 +4,7 @@ import java.io.Serializable; ...@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
public class CartItem implements Serializable { public class CartItem implements Serializable {
private static final long serialVersionUID = 6620528781626504362L; private static final long serialVersionUID = 6620528781626504362L;
private Item item; private Item item;
......
...@@ -5,6 +5,7 @@ import java.io.Serializable; ...@@ -5,6 +5,7 @@ import java.io.Serializable;
public class Product implements Serializable { public class Product implements Serializable {
private static final long serialVersionUID = -7492639752670189553L; private static final long serialVersionUID = -7492639752670189553L;
private String productId; private String productId;
private String categoryId; private String categoryId;
private String name; private String name;
......
...@@ -5,7 +5,7 @@ import java.io.Serializable; ...@@ -5,7 +5,7 @@ import java.io.Serializable;
public class Sequence implements Serializable { public class Sequence implements Serializable {
private static final long serialVersionUID = 8278780133180137281L; private static final long serialVersionUID = 8278780133180137281L;
private String name; private String name;
private int nextId; private int nextId;
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!-- enable transaction demarcation with annotations --> <!-- enable transaction demarcation with annotations -->
<tx:annotation-driven /> <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"> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" /> <property name="dataSource" ref="dataSource" />
<property name="configLocation" value="classpath:mybatis-config.xml" /> <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