Compare commits

..

8 commits

Author SHA1 Message Date
6c663fc839 Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks failed
ci / test (push) Failing after 10s
ci / test (pull_request) Failing after 9s
2026-07-10 13:30:15 +00:00
75c7089960 Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks failed
ci / test (push) Has been cancelled
2026-07-10 13:30:14 +00:00
4a409dff16 Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks failed
ci / test (push) Has been cancelled
2026-07-10 13:30:13 +00:00
8e606e79dc Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks are pending
ci / test (push) Waiting to run
2026-07-10 13:30:12 +00:00
533ec7c653 Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks are pending
ci / test (push) Waiting to run
2026-07-10 13:30:10 +00:00
36aece10cc Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks failed
ci / test (push) Has been cancelled
2026-07-10 13:30:09 +00:00
986e09a475 Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
Some checks are pending
ci / test (push) Waiting to run
2026-07-10 13:30:08 +00:00
22fd8e4216 forge: open work branch for BAIS-SPRING-ARC-001-attempt-1
Some checks failed
ci / test (push) Failing after 9s
2026-07-10 13:29:52 +00:00
8 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# BAIS-SPRING-ARC-001-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-SPRING-ARC-001-attempt-1`.

View file

@ -0,0 +1,14 @@
package com.example.demo.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
public class TransactionPolicyConfig {
@Bean
public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
return new JpaTransactionManager(entityManagerFactory);
}
}

View file

@ -0,0 +1,20 @@
package com.example.demo.controller;
import org.springframework.web.bind.annotation.*;
import com.example.demo.service.TransactionService;
import com.example.demo.dto.TransactionDTO;
@RestController
@RequestMapping("/api/transactions")
public class TransactionController {
private final TransactionService transactionService;
public TransactionController(TransactionService transactionService) {
this.transactionService = transactionService;
}
@PostMapping
public void createTransaction(@RequestBody TransactionDTO transactionDTO) {
transactionService.processTransaction(transactionDTO);
}
}

View file

@ -0,0 +1,9 @@
package com.example.demo.dto;
public class TransactionDTO {
private Long id;
private Double amount;
private String description;
// Getters and Setters
}

View file

@ -0,0 +1,13 @@
package com.example.demo.error;
public class ErrorResponse {
private String message;
private int status;
public ErrorResponse(String message, int status) {
this.message = message;
this.status = status;
}
// Getters
}

View file

@ -0,0 +1,38 @@
package com.example.demo.job;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableBatchProcessing
public class TransactionJobConfig {
private final JobBuilderFactory jobBuilderFactory;
private final StepBuilderFactory stepBuilderFactory;
public TransactionJobConfig(JobBuilderFactory jobBuilderFactory, StepBuilderFactory stepBuilderFactory) {
this.jobBuilderFactory = jobBuilderFactory;
this.stepBuilderFactory = stepBuilderFactory;
}
@Bean
public Job transactionJob() {
return jobBuilderFactory.get("transactionJob")
.start(transactionStep())
.build();
}
@Bean
public Step transactionStep() {
return stepBuilderFactory.get("transactionStep")
.tasklet((contribution, chunkContext) -> {
// 배치 작업 로직
return null;
})
.build();
}
}

View file

@ -0,0 +1,7 @@
package com.example.demo.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import com.example.demo.model.Transaction;
public interface TransactionRepository extends JpaRepository<Transaction, Long> {
}

View file

@ -0,0 +1,11 @@
package com.example.demo.service;
import org.springframework.stereotype.Service;
import com.example.demo.dto.TransactionDTO;
@Service
public class TransactionService {
public void processTransaction(TransactionDTO transactionDTO) {
// 거래 처리 로직
}
}