인프런 커뮤니티 질문&답변

cando1234님의 프로필 이미지
cando1234

작성한 질문수

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

주문 취소 Cancel 버튼이 작동하지 않음

작성

·

296

0

주문 취소 기능을 가진 cancel 버튼을 클릭해도 주문 취소 상태로 변하지 않습니다. 

무엇이 문제일까요?

 

cancel 버튼 누를 시 콘솔

2022-01-28 09:45:17.700 DEBUG 7444 --- [nio-8080-exec-4] org.hibernate.SQL                        : 

    select

        order0_.order_id as order_id1_6_0_,

        order0_.delivery_id as delivery4_6_0_,

        order0_.member_id as member_i5_6_0_,

        order0_.order_date as order_da2_6_0_,

        order0_.status as status3_6_0_ 

    from

        orders order0_ 

    where

        order0_.order_id=?

2022-01-28 09:45:17.700 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [3]

2022-01-28 09:45:17.702  INFO 7444 --- [nio-8080-exec-4] p6spy                                    : #1643330717702 | took 1ms | statement | connection 18| url jdbc:h2:tcp://localhost/~/jpashop

select order0_.order_id as order_id1_6_0_, order0_.delivery_id as delivery4_6_0_, order0_.member_id as member_i5_6_0_, order0_.order_date as order_da2_6_0_, order0_.status as status3_6_0_ from orders order0_ where order0_.order_id=?

select order0_.order_id as order_id1_6_0_, order0_.delivery_id as delivery4_6_0_, order0_.member_id as member_i5_6_0_, order0_.order_date as order_da2_6_0_, order0_.status as status3_6_0_ from orders order0_ where order0_.order_id=3;

2022-01-28 09:45:17.703 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([delivery4_6_0_] : [BIGINT]) - [4]

2022-01-28 09:45:17.703 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([member_i5_6_0_] : [BIGINT]) - [1]

2022-01-28 09:45:17.704 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_da2_6_0_] : [TIMESTAMP]) - [2022-01-28T09:43:00.843051]

2022-01-28 09:45:17.704 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([status3_6_0_] : [VARCHAR]) - [ORDER]

2022-01-28 09:45:17.706 TRACE 7444 --- [nio-8080-exec-4] org.hibernate.type.CollectionType        : Created collection wrapper: [jpabook.jpashop.domain.Order.orderItems#3]

2022-01-28 09:45:17.707 DEBUG 7444 --- [nio-8080-exec-4] org.hibernate.SQL                        : 

    select

        delivery0_.delivery_id as delivery1_2_0_,

        delivery0_.city as city2_2_0_,

        delivery0_.street as street3_2_0_,

        delivery0_.zipcode as zipcode4_2_0_,

        delivery0_.status as status5_2_0_ 

    from

        delivery delivery0_ 

    where

        delivery0_.delivery_id=?

2022-01-28 09:45:17.708 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [4]

2022-01-28 09:45:17.710  INFO 7444 --- [nio-8080-exec-4] p6spy                                    : #1643330717710 | took 0ms | statement | connection 18| url jdbc:h2:tcp://localhost/~/jpashop

select delivery0_.delivery_id as delivery1_2_0_, delivery0_.city as city2_2_0_, delivery0_.street as street3_2_0_, delivery0_.zipcode as zipcode4_2_0_, delivery0_.status as status5_2_0_ from delivery delivery0_ where delivery0_.delivery_id=?

select delivery0_.delivery_id as delivery1_2_0_, delivery0_.city as city2_2_0_, delivery0_.street as street3_2_0_, delivery0_.zipcode as zipcode4_2_0_, delivery0_.status as status5_2_0_ from delivery delivery0_ where delivery0_.delivery_id=4;

2022-01-28 09:45:17.710 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([city2_2_0_] : [VARCHAR]) - [qq]

2022-01-28 09:45:17.710 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([street3_2_0_] : [VARCHAR]) - [qq]

2022-01-28 09:45:17.710 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([zipcode4_2_0_] : [VARCHAR]) - [11111]

2022-01-28 09:45:17.711 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([status5_2_0_] : [VARCHAR]) - [null]

2022-01-28 09:45:17.711 DEBUG 7444 --- [nio-8080-exec-4] org.hibernate.SQL                        : 

    select

        orderitems0_.order_id as order_id5_5_0_,

        orderitems0_.order_item_id as order_it1_5_0_,

        orderitems0_.order_item_id as order_it1_5_1_,

        orderitems0_.count as count2_5_1_,

        orderitems0_.item_id as item_id4_5_1_,

        orderitems0_.order_id as order_id5_5_1_,

        orderitems0_.order_price as order_pr3_5_1_ 

    from

        order_item orderitems0_ 

    where

        orderitems0_.order_id=?

2022-01-28 09:45:17.712 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [3]

2022-01-28 09:45:17.713  INFO 7444 --- [nio-8080-exec-4] p6spy                                    : #1643330717713 | took 0ms | statement | connection 18| url jdbc:h2:tcp://localhost/~/jpashop

select orderitems0_.order_id as order_id5_5_0_, orderitems0_.order_item_id as order_it1_5_0_, orderitems0_.order_item_id as order_it1_5_1_, orderitems0_.count as count2_5_1_, orderitems0_.item_id as item_id4_5_1_, orderitems0_.order_id as order_id5_5_1_, orderitems0_.order_price as order_pr3_5_1_ from order_item orderitems0_ where orderitems0_.order_id=?

select orderitems0_.order_id as order_id5_5_0_, orderitems0_.order_item_id as order_it1_5_0_, orderitems0_.order_item_id as order_it1_5_1_, orderitems0_.count as count2_5_1_, orderitems0_.item_id as item_id4_5_1_, orderitems0_.order_id as order_id5_5_1_, orderitems0_.order_price as order_pr3_5_1_ from order_item orderitems0_ where orderitems0_.order_id=3;

2022-01-28 09:45:17.713 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_it1_5_1_] : [BIGINT]) - [5]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([count2_5_1_] : [INTEGER]) - [3]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([item_id4_5_1_] : [BIGINT]) - [2]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_id5_5_1_] : [BIGINT]) - [3]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_pr3_5_1_] : [INTEGER]) - [1111]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_id5_5_0_] : [BIGINT]) - [3]

2022-01-28 09:45:17.714 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_it1_5_0_] : [BIGINT]) - [5]

2022-01-28 09:45:17.715 DEBUG 7444 --- [nio-8080-exec-4] org.hibernate.SQL                        : 

    select

        item0_.item_id as item_id2_3_0_,

        item0_.name as name3_3_0_,

        item0_.price as price4_3_0_,

        item0_.stock_quantity as stock_qu5_3_0_,

        item0_.artist as artist6_3_0_,

        item0_.etc as etc7_3_0_,

        item0_.author as author8_3_0_,

        item0_.isbn as isbn9_3_0_,

        item0_.actor as actor10_3_0_,

        item0_.director as directo11_3_0_,

        item0_.dtype as dtype1_3_0_ 

    from

        item item0_ 

    where

        item0_.item_id=?

2022-01-28 09:45:17.716 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [2]

2022-01-28 09:45:17.717  INFO 7444 --- [nio-8080-exec-4] p6spy                                    : #1643330717717 | took 0ms | statement | connection 18| url jdbc:h2:tcp://localhost/~/jpashop

select item0_.item_id as item_id2_3_0_, item0_.name as name3_3_0_, item0_.price as price4_3_0_, item0_.stock_quantity as stock_qu5_3_0_, item0_.artist as artist6_3_0_, item0_.etc as etc7_3_0_, item0_.author as author8_3_0_, item0_.isbn as isbn9_3_0_, item0_.actor as actor10_3_0_, item0_.director as directo11_3_0_, item0_.dtype as dtype1_3_0_ from item item0_ where item0_.item_id=?

select item0_.item_id as item_id2_3_0_, item0_.name as name3_3_0_, item0_.price as price4_3_0_, item0_.stock_quantity as stock_qu5_3_0_, item0_.artist as artist6_3_0_, item0_.etc as etc7_3_0_, item0_.author as author8_3_0_, item0_.isbn as isbn9_3_0_, item0_.actor as actor10_3_0_, item0_.director as directo11_3_0_, item0_.dtype as dtype1_3_0_ from item item0_ where item0_.item_id=2;

2022-01-28 09:45:17.717 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([dtype1_3_0_] : [VARCHAR]) - [B]

2022-01-28 09:45:17.718 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([name3_3_0_] : [VARCHAR]) - [add]

2022-01-28 09:45:17.719 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([price4_3_0_] : [INTEGER]) - [1111]

2022-01-28 09:45:17.719 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([stock_qu5_3_0_] : [INTEGER]) - [1108]

2022-01-28 09:45:17.719 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([author8_3_0_] : [VARCHAR]) - [dffdsf]

2022-01-28 09:45:17.719 TRACE 7444 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([isbn9_3_0_] : [VARCHAR]) - [3432423]

2022-01-28 09:45:17.720 TRACE 7444 --- [nio-8080-exec-4] org.hibernate.type.CollectionType        : Created collection wrapper: [jpabook.jpashop.domain.item.Item.categories#2]

2022-01-28 09:45:17.722  INFO 7444 --- [nio-8080-exec-4] p6spy                                    : #1643330717722 | took 0ms | commit | connection 18| url jdbc:h2:tcp://localhost/~/jpashop

 

;

2022-01-28 09:45:17.749 DEBUG 7444 --- [nio-8080-exec-3] org.hibernate.SQL                        : 

    select

        order0_.order_id as order_id1_6_,

        order0_.delivery_id as delivery4_6_,

        order0_.member_id as member_i5_6_,

        order0_.order_date as order_da2_6_,

        order0_.status as status3_6_ 

    from

        orders order0_ 

    inner join

        member member1_ 

            on order0_.member_id=member1_.member_id limit ?

2022-01-28 09:45:17.750  INFO 7444 --- [nio-8080-exec-3] p6spy                                    : #1643330717750 | took 0ms | statement | connection 19| url jdbc:h2:tcp://localhost/~/jpashop

select order0_.order_id as order_id1_6_, order0_.delivery_id as delivery4_6_, order0_.member_id as member_i5_6_, order0_.order_date as order_da2_6_, order0_.status as status3_6_ from orders order0_ inner join member member1_ on order0_.member_id=member1_.member_id limit ?

select order0_.order_id as order_id1_6_, order0_.delivery_id as delivery4_6_, order0_.member_id as member_i5_6_, order0_.order_date as order_da2_6_, order0_.status as status3_6_ from orders order0_ inner join member member1_ on order0_.member_id=member1_.member_id limit 1000;

2022-01-28 09:45:17.750 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_id1_6_] : [BIGINT]) - [3]

2022-01-28 09:45:17.751 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([delivery4_6_] : [BIGINT]) - [4]

2022-01-28 09:45:17.751 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([member_i5_6_] : [BIGINT]) - [1]

2022-01-28 09:45:17.751 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_da2_6_] : [TIMESTAMP]) - [2022-01-28T09:43:00.843051]

2022-01-28 09:45:17.752 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([status3_6_] : [VARCHAR]) - [ORDER]

2022-01-28 09:45:17.753 TRACE 7444 --- [nio-8080-exec-3] org.hibernate.type.CollectionType        : Created collection wrapper: [jpabook.jpashop.domain.Order.orderItems#3]

2022-01-28 09:45:17.755  INFO 7444 --- [nio-8080-exec-3] p6spy                                    : #1643330717755 | took 0ms | commit | connection 19| url jdbc:h2:tcp://localhost/~/jpashop

 

;

2022-01-28 09:45:17.776 DEBUG 7444 --- [nio-8080-exec-3] org.hibernate.SQL                        : 

    select

        member0_.member_id as member_i1_4_0_,

        member0_.city as city2_4_0_,

        member0_.street as street3_4_0_,

        member0_.zipcode as zipcode4_4_0_,

        member0_.name as name5_4_0_ 

    from

        member member0_ 

    where

        member0_.member_id=?

2022-01-28 09:45:17.776 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [1]

2022-01-28 09:45:17.777  INFO 7444 --- [nio-8080-exec-3] p6spy                                    : #1643330717777 | took 0ms | statement | connection 19| url jdbc:h2:tcp://localhost/~/jpashop

select member0_.member_id as member_i1_4_0_, member0_.city as city2_4_0_, member0_.street as street3_4_0_, member0_.zipcode as zipcode4_4_0_, member0_.name as name5_4_0_ from member member0_ where member0_.member_id=?

select member0_.member_id as member_i1_4_0_, member0_.city as city2_4_0_, member0_.street as street3_4_0_, member0_.zipcode as zipcode4_4_0_, member0_.name as name5_4_0_ from member member0_ where member0_.member_id=1;

2022-01-28 09:45:17.778 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([city2_4_0_] : [VARCHAR]) - [qq]

2022-01-28 09:45:17.778 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([street3_4_0_] : [VARCHAR]) - [qq]

2022-01-28 09:45:17.778 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([zipcode4_4_0_] : [VARCHAR]) - [11111]

2022-01-28 09:45:17.778 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([name5_4_0_] : [VARCHAR]) - [qq]

2022-01-28 09:45:17.778 TRACE 7444 --- [nio-8080-exec-3] org.hibernate.type.CollectionType        : Created collection wrapper: [jpabook.jpashop.domain.Member.orders#1]

2022-01-28 09:45:17.780 DEBUG 7444 --- [nio-8080-exec-3] org.hibernate.SQL                        : 

    select

        orderitems0_.order_id as order_id5_5_0_,

        orderitems0_.order_item_id as order_it1_5_0_,

        orderitems0_.order_item_id as order_it1_5_1_,

        orderitems0_.count as count2_5_1_,

        orderitems0_.item_id as item_id4_5_1_,

        orderitems0_.order_id as order_id5_5_1_,

        orderitems0_.order_price as order_pr3_5_1_ 

    from

        order_item orderitems0_ 

    where

        orderitems0_.order_id=?

2022-01-28 09:45:17.780 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [3]

2022-01-28 09:45:17.782  INFO 7444 --- [nio-8080-exec-3] p6spy                                    : #1643330717782 | took 1ms | statement | connection 19| url jdbc:h2:tcp://localhost/~/jpashop

select orderitems0_.order_id as order_id5_5_0_, orderitems0_.order_item_id as order_it1_5_0_, orderitems0_.order_item_id as order_it1_5_1_, orderitems0_.count as count2_5_1_, orderitems0_.item_id as item_id4_5_1_, orderitems0_.order_id as order_id5_5_1_, orderitems0_.order_price as order_pr3_5_1_ from order_item orderitems0_ where orderitems0_.order_id=?

select orderitems0_.order_id as order_id5_5_0_, orderitems0_.order_item_id as order_it1_5_0_, orderitems0_.order_item_id as order_it1_5_1_, orderitems0_.count as count2_5_1_, orderitems0_.item_id as item_id4_5_1_, orderitems0_.order_id as order_id5_5_1_, orderitems0_.order_price as order_pr3_5_1_ from order_item orderitems0_ where orderitems0_.order_id=3;

2022-01-28 09:45:17.782 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_it1_5_1_] : [BIGINT]) - [5]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([count2_5_1_] : [INTEGER]) - [3]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([item_id4_5_1_] : [BIGINT]) - [2]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_id5_5_1_] : [BIGINT]) - [3]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_pr3_5_1_] : [INTEGER]) - [1111]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_id5_5_0_] : [BIGINT]) - [3]

2022-01-28 09:45:17.783 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([order_it1_5_0_] : [BIGINT]) - [5]

2022-01-28 09:45:17.784 DEBUG 7444 --- [nio-8080-exec-3] org.hibernate.SQL                        : 

    select

        item0_.item_id as item_id2_3_0_,

        item0_.name as name3_3_0_,

        item0_.price as price4_3_0_,

        item0_.stock_quantity as stock_qu5_3_0_,

        item0_.artist as artist6_3_0_,

        item0_.etc as etc7_3_0_,

        item0_.author as author8_3_0_,

        item0_.isbn as isbn9_3_0_,

        item0_.actor as actor10_3_0_,

        item0_.director as directo11_3_0_,

        item0_.dtype as dtype1_3_0_ 

    from

        item item0_ 

    where

        item0_.item_id=?

2022-01-28 09:45:17.787 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [BIGINT] - [2]

2022-01-28 09:45:17.788  INFO 7444 --- [nio-8080-exec-3] p6spy                                    : #1643330717788 | took 0ms | statement | connection 19| url jdbc:h2:tcp://localhost/~/jpashop

select item0_.item_id as item_id2_3_0_, item0_.name as name3_3_0_, item0_.price as price4_3_0_, item0_.stock_quantity as stock_qu5_3_0_, item0_.artist as artist6_3_0_, item0_.etc as etc7_3_0_, item0_.author as author8_3_0_, item0_.isbn as isbn9_3_0_, item0_.actor as actor10_3_0_, item0_.director as directo11_3_0_, item0_.dtype as dtype1_3_0_ from item item0_ where item0_.item_id=?

select item0_.item_id as item_id2_3_0_, item0_.name as name3_3_0_, item0_.price as price4_3_0_, item0_.stock_quantity as stock_qu5_3_0_, item0_.artist as artist6_3_0_, item0_.etc as etc7_3_0_, item0_.author as author8_3_0_, item0_.isbn as isbn9_3_0_, item0_.actor as actor10_3_0_, item0_.director as directo11_3_0_, item0_.dtype as dtype1_3_0_ from item item0_ where item0_.item_id=2;

2022-01-28 09:45:17.788 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([dtype1_3_0_] : [VARCHAR]) - [B]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([name3_3_0_] : [VARCHAR]) - [add]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([price4_3_0_] : [INTEGER]) - [1111]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([stock_qu5_3_0_] : [INTEGER]) - [1108]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([author8_3_0_] : [VARCHAR]) - [dffdsf]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicExtractor   : extracted value ([isbn9_3_0_] : [VARCHAR]) - [3432423]

2022-01-28 09:45:17.789 TRACE 7444 --- [nio-8080-exec-3] org.hibernate.type.CollectionType        : Created collection wrapper: [jpabook.jpashop.domain.item.Item.categories#2]

 

 

소스코드 : https://github.com/AmyLim328/springboot-jpa-jpashop

답변 2

2

안녕하세요. cando1234님, 공식 서포터즈 OMG입니다.

프로젝트 코드 확인해보았습니다.

취소가 안된다고 하셔서 관련된 html, java코드 살펴봤는데요,

제공해드리는 html코드를 복붙해도 동일한 증상이길래 자바코드를 살펴보았습니다.

우선 주문상태가 cancel로 변하는지 살펴보았는데 이건 값이 변하더라구요.

그래서 db에 값이 변했나 보니 값이 변하지 않았길래 transaction문제 겠구나 싶어서

보니 @Transactional이 빠져있더라구요 ^^

제가 확인한 과정보다 더 좋은 방법이 있을지 모르겠지만 이러한 확인 과정은 디버깅을 통해 해결하실 수 있어야합니다.


감사합니다.

0

김영한님의 프로필 이미지
김영한
지식공유자

안녕하세요. cando1234님^^

다음 강의 소스코드와 비교해보시면 금방 찾을 수 있을거에요.

https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-JPA-%ED%99%9C%EC%9A%A9-1/lecture/86625

감사합니다.

cando1234님의 프로필 이미지
cando1234
질문자

안녕하세요 영한님 답변 감사합니다. 소스 코드 다운 받아 파일 일일이 비교해서 빠진 부분 수정하였는데도 여전히 cancel 버튼을 클릭하면 아무런 변화가 없습니다. 혹시나 싶어 다운 받은 소스 코드도 실행해보았지만 이건 정상적으로 작동합니다. 도대체 뭐가 문제일까요? 혹시 시간 되시면 제가 작성한 소스 코드 한 번만 봐주실 수 있나요? https://github.com/AmyLim328/springboot-jpa-jpashop

cando1234님의 프로필 이미지
cando1234

작성한 질문수

질문하기