260508_03_ENH: 트렌젝션 및 최대 연결 풀 설정 적용
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user