260508_03_ENH: 트렌젝션 및 최대 연결 풀 설정 적용

This commit is contained in:
2026-05-08 15:38:01 +09:00
parent 727097f6bd
commit ad45d7fd7f
5 changed files with 19 additions and 4 deletions

View File

@@ -20,9 +20,10 @@ public class DataSourceConfig {
@Bean(name = "mainDataSource")
@Primary
public DataSource mainDataSource(DataSourceProperties mainDataSourceProperties) {
@ConfigurationProperties(prefix = "spring.datasource.hikari")
public HikariDataSource mainDataSource(DataSourceProperties mainDataSourceProperties) {
return mainDataSourceProperties.initializeDataSourceBuilder()
.type(HikariDataSource.class)
.build();
}
}
}

View File

@@ -12,6 +12,7 @@ import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
@@ -28,6 +29,7 @@ public class AdminService {
@Value("${kri.kfpa-comment-idkey-suffix:}")
private String kfpaCommentIdkeySuffix;
@Transactional
public boolean updateDivComment(RequestWriteDivCommentDto request) {
String idkey = IDKEY_MAP.get(request.getDivId().toString());
if (idkey == null) {

View File

@@ -11,9 +11,11 @@ import com.kri.kfpa.dash.entity.KonUserEntity;
import com.kri.kfpa.dash.mapper.KonUserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class AuthService {
private final JwtService jwtService;
private final KonUserMapper konUserMapper;

View File

@@ -21,9 +21,11 @@ import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class StatisticsService {
private final DataMapper dataMapper;