Buggy code:
@ Controller @ RequestMapping ( "//shoppingCartController" ) public class ShoppingCartController { @ Autowired private WishlistService wishlistService ; @ Autowired private UserService userService ; @ Autowired private WishlistDetailService wishlistDetailService ; @ Autowired private CartService cartService ; @ Autowired private CartDetailService cartDetailService ; @ Autowired private WishService wishService ; public Map < Integer , Wish > wishsMap = null ; private void initialWishMap ( ) { } @ ResponseBody @ RequestMapping ( value = "//getCart" , method = RequestMethod . GET , produces = "application//json" ) public int getCart ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//getAllGoodsForShoppingCart" , method = RequestMethod . GET , produces = "application//json" ) public List < CartlistJson > getAllGoodsForShoppingCart ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//getDirectWishListForPaymnetConfirm" , method = RequestMethod . GET , produces = "application//json" ) public List < CartlistJson > getCartDetailsForPaymnetConfirm ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//selectOneItem" , method = RequestMethod . GET , produces = "application//json" ) public void selectOneItem ( HttpServletRequest request ) { } @ ResponseBody <START_BUG> @ RequestMapping ( value = "//addSingleToCart" , method = RequestMethod . GET ) <END_BUG> public List < CartDetail > addingCartSingle ( HttpServletRequest request ) { List < CartDetail > successList = new ArrayList < CartDetail > ( ) ; User user = ( ( User ) ( request . getSession ( ) . getAttribute ( "user" ) ) ) ; if ( user == null ) { return null ; } Integer cartId = user . getCartId ( ) ; Cart cart = cartService . getResource ( cartId ) ; Integer wishId = Integer . valueOf ( request . getParameter ( "wishId" ) ) ; Wish wish = wishService . getResource ( wishId ) ; Date sysDate = new Date ( ) ; if ( ( wishsMap ) == null ) { initialWishMap ( ) ; } CartDetail cartDetail = new CartDetail ( ) ; wish = wishsMap . get ( wish . getWishId ( ) ) ; cartDetail . setWishId ( wish . getWishId ( ) ) ; cartDetail . setCount ( 1 ) ; cartDetail . setPrice ( wish . getSellingPrice ( ) ) ; cartDetail . setOriginalPrice ( wish . getXianenPrice ( ) ) ; cartDetail . setWishType ( wish . getGeneralCode ( ) ) ; cartDetail . setSourceId ( wish_source_direct ) ; cartDetail . setCartId ( cartId ) ; cartDetail . setCreatedDate ( sysDate ) ; cartDetail . setUpdatedDate ( sysDate ) ; cartDetail . setSelected ( 0 ) ; cartDetailService . addResource ( cartDetail ) ; cart . setPrice ( cart . getPrice ( ) . add ( wish . getSellingPrice ( ) ) ) ; cart . setOriginalPrice ( cart . getOriginalPrice ( ) . add ( wish . getXianenPrice ( ) ) ) ; successList . add ( cartDetail ) ; cartService . updateResource ( cart ) ; return successList ; } @ ResponseBody @ RequestMapping ( value = "//selectAll" , method = RequestMethod . GET , produces = "application//json" ) public ShoppingCart selectAll ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//delete" , method = RequestMethod . GET ) public void delete ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//oneMore" , method = RequestMethod . GET ) public ModelAndView oneMore ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//subtraction" , method = RequestMethod . GET ) public ModelAndView subtraction ( HttpServletRequest request ) { } public Cart getCalculatedCart ( int cartId ) { } @ ResponseBody @ RequestMapping ( value = "//loadShoppingCart" , method = RequestMethod . GET , produces = "application//json" ) public ShoppingCart loadShoppingCart ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//listCountOfCart" , method = RequestMethod . GET , produces = "application//json" ) public Integer listCountOfCart ( HttpServletRequest request ) { } @ ResponseBody @ RequestMapping ( value = "//listCart" , method = RequestMethod . GET , produces = "application//json" ) public Cart listOfCart ( HttpServletRequest request ) { } }

Fix:
@ RequestMapping ( value = "//addSingleToCart" , method = RequestMethod . POST )