-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- ProductLine 통합테스트 수정 필요
- Loading branch information
Showing
11 changed files
with
82 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
...ct/repository/UpperProductRepository.java → .../repository/ProductMybatisRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
package org.store.clothstar.product.repository; | ||
|
||
import org.apache.ibatis.annotations.Mapper; | ||
import org.store.clothstar.product.domain.Product; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface UpperProductRepository { | ||
@Mapper | ||
public interface ProductMybatisRepository extends ProductRepository { | ||
|
||
List<Product> selectAllProductByProductLineId(Long productId); | ||
List<Product> selectAllProductsById(Long productId); | ||
|
||
Optional<Product> selectByProductId(Long productId); | ||
|
||
// Optional<ProductLineWithProductsResponse> selectProductLineWithOptions(Long productId); | ||
|
||
int save(Product product); | ||
|
||
int updateProduct(Product product); | ||
|
||
int deleteProduct(Long productId); | ||
|
||
} |
9 changes: 2 additions & 7 deletions
9
src/main/java/org/store/clothstar/product/repository/ProductRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
package org.store.clothstar.product.repository; | ||
|
||
import org.apache.ibatis.annotations.Mapper; | ||
import org.store.clothstar.product.domain.Product; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
@Mapper | ||
public interface ProductRepository extends UpperProductRepository { | ||
public interface ProductRepository { | ||
|
||
List<Product> selectAllProductsById(Long productId); | ||
List<Product> selectAllProductByProductLineId(Long productId); | ||
|
||
Optional<Product> selectByProductId(Long productId); | ||
|
||
// Optional<ProductLineWithProductsResponse> selectProductLineWithOptions(Long productId); | ||
|
||
int save(Product product); | ||
|
||
int updateProduct(Product product); | ||
|
||
int deleteProduct(Long productId); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- # local 공통 설정 | ||
spring: | ||
config: | ||
activate: | ||
on-profile: "db-local" | ||
datasource: | ||
url: jdbc:h2:mem:localdb | ||
username: sa | ||
password: | ||
driver-class-name: org.h2.Driver | ||
p6spy: | ||
enabled: true | ||
appender: com.p6spy.engine.spy.appender.Slf4JLogger | ||
logMessageFormat: | ||
p6spy: "%(currentTime)|%(executionTime)|%(category)|%(sqlSingleLine)" | ||
h2: | ||
console: | ||
enabled: true | ||
thymeleaf: | ||
cache: false | ||
|
||
--- # local - MyBatis 활성화 | ||
spring: | ||
config: | ||
activate: | ||
on-profile: "db-local-mybatis" | ||
mybatis: | ||
mapper-locations: classpath:/mappers/**.xml | ||
config-location: classpath:/config/mybatis-config.xml | ||
|
||
--- # local - JPA 활성화 | ||
spring: | ||
config: | ||
activate: | ||
on-profile: "db-local-jpa" | ||
jpa: | ||
show-sql: true | ||
database-platform: H2 | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
default_batch_fetch_size: 100 |