Skip to content

Commit

Permalink
refactor : merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
codesejin committed Jun 10, 2024
2 parents 57adb5b + 26363b4 commit a27774e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public class DefaultCouponIssueService {
private final EventCacheService eventCacheService;
private final CouponRepository couponRepository;
private final CouponIssueRepository couponIssueRepository;
private final CouponIssueTransactionalService transactionalService;
private final EventCacheService eventCacheService;
private final CouponIssueTransactionalService transactionalService;

@Transactional
public ResponseDTO<String> issueCoupon(LocalDateTime currentDateTime, IssueRequestParameter requestParameter) {
Expand Down Expand Up @@ -71,4 +72,7 @@ private void checkAlreadyIssueHistory(long memberId, long couponId, LocalDateTim
throw new DuplicatedCouponException(DUPLICATED_COUPON.formatted(memberId, couponId));
}
}
private Coupon findCoupon(long couponId) {
return couponRepository.getCouponById(couponId);
}
}
30 changes: 30 additions & 0 deletions src/main/resources/application-test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
spring.config.activate.on-profile=test

# MySQL Database Configuration
#DRIVER_NAME=org.testcontainers.jdbc.ContainerDatabaseDriver
#DB_URL=jdbc:tc:mysql:8.0.36://off_coupon?TC_INITSCRIPT=file:src/main/resources/schema.sql
##DB_HOST=localhost
##DB_PORT=3306
##DB_DATABASE=off_coupon
#DB_USERNAME=root
#DB_PASSWORD=1234

DRIVER_NAME=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
DB_URL=jdbc:log4jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_DATABASE}?serverTimezone=Asia/Seoul
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=off_coupon
DB_USERNAME=root
DB_PASSWORD=1234


# REDIS \uC124\uC815
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=redis1234

# RabbitMQ \uC124\uC815
RABBITMQ_HOST=127.0.0.1
RABBITMQ_PORT=5672
RABBITMQ_USERNAME=admin
RABBITMQ_PASSWORD=admin123!@#
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server.port=8080

spring.profiles.active=local
spring.profiles.active=develop

# MySQL Database Configuration
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Expand Down

0 comments on commit a27774e

Please sign in to comment.