Skip to content

chore(be): SpringBoot 세팅 (#3)#6

Merged
crolvlee merged 3 commits into
developfrom
chore/3-backend-setup
Jun 15, 2026
Merged

chore(be): SpringBoot 세팅 (#3)#6
crolvlee merged 3 commits into
developfrom
chore/3-backend-setup

Conversation

@crolvlee

@crolvlee crolvlee commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

변경 내용

  • 기존 실습 코드(raw JDBC) 제거
  • Spring Boot 3.5.15 + Maven 기반 프로젝트 새로 구성

연결 이슈

closes #3

테스트

  • 단위 테스트 통과
  • 로컬 동작 확인
  • API 응답 형식 확인 (docs/08_API_SPEC.md)

Summary by CodeRabbit

Release Notes

  • Chores

    • Upgraded backend infrastructure to Spring Boot 3.5.15 with Java 21
    • Refactored legacy database code and modernized project structure
    • Updated build system configuration and tooling
  • Tests

    • Added Spring Boot application startup tests
  • Documentation

    • Updated architecture documentation to reflect current system design

@crolvlee crolvlee changed the title chore(backend): SpringBoot 세팅 (#3) chore(be): SpringBoot 세팅 (#3) Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR removes the old Eclipse-based, plain-JDBC salmanApp backend (DAO interfaces and implementations, DTOs, service layer, DBUtil, ad-hoc test classes, and Eclipse project metadata) and replaces it with a minimal Spring Boot 3 scaffold under the salmanhae package. It also adds Maven wrapper scripts (mvnw/mvnw.cmd), updates pom.xml to Spring Boot 3.5.15 / Java 21, and refreshes the architecture documentation.

Changes

Backend Reset to Spring Boot 3

Layer / File(s) Summary
Maven wrapper scripts and repo tooling config
backend/mvnw, backend/mvnw.cmd, backend/.mvn/wrapper/maven-wrapper.properties, backend/.gitattributes, backend/.gitignore
Adds POSIX and Windows Maven wrapper scripts (download, SHA-256 validation, extraction of Maven 3.9.16), wrapper properties, line-ending rules, and IDE/build artifact ignore patterns.
POM restructured for Spring Boot 3 / Java 21
backend/pom.xml
artifactId renamed to salmanhae, Spring Boot parent 3.5.15 added, Java set to 21, dependencies reduced to spring-boot-starter + spring-boot-starter-test (MySQL and Lombok removed), Spring Boot Maven plugin added.
Removal of old JDBC DAO, service, DTO, util, and test classes
backend/src/main/java/com/ssafy/salmanApp/...
Deletes HouseDealDAO, HouseInfoDAO, BasicHouseDealDAO, BasicHouseInfoDAO, HouseDealDTO, HouseInfoDTO, HouseService, BasicHouseService, DBUtil, and three ad-hoc test main classes.
New Spring Boot salmanhae scaffold
backend/src/main/java/com/ssafy/salmanhae/SalmanhaeApplication.java, backend/src/main/resources/application.properties, backend/src/test/java/com/ssafy/salmanhae/SalmanhaeApplicationTests.java
Introduces @SpringBootApplication entry point, sets spring.application.name=salmanhae, and adds a contextLoads() smoke test.
Architecture doc updated
docs/02_ARCHITECTURE.md
Package path updated to com/ssafy/salmanhae; Frontend, Spring Boot, and FastAPI service sections expanded; design patterns converted to a structured table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop! The old JDBC maze is gone,
Eclipse configs swept away at dawn.
Spring Boot 3 blooms in salmanhae's name,
A fresh mvnw script joins the game.
The rabbit cheers: clean slate, here we come! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title correctly summarizes the main change: establishing Spring Boot configuration for the backend project as a foundational setup task.
Description check ✅ Passed The description follows the template structure with clear sections covering changes, linked issue, and testing checklist. All required sections are present and populated with relevant information.
Linked Issues check ✅ Passed Both linked issue #3 objectives are satisfied: existing raw JDBC code removed (DAO/DTO/service classes, test classes, DBUtil) and new Spring Boot 3.5.15 project configured with Maven.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives of removing legacy JDBC code and establishing Spring Boot 3 setup. Documentation updates support the restructuring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/3-backend-setup

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/02_ARCHITECTURE.md (1)

36-42: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Reconcile architecture documentation with pom.xml dependency configuration.

The architecture document describes a layered stack with specific technologies—MyBatis DAO pattern (line 124), Spring Security (line 37), REST controllers, and database connectivity—but pom.xml contains only spring-boot-starter and spring-boot-starter-test with no database driver, persistence framework, or security dependencies.

This creates a contract mismatch: developers reading this document will expect MyBatis, Spring Security, and database capabilities to be available, but they will encounter missing dependency errors at runtime.

Action: Either (a) add the missing dependencies to pom.xml now (spring-boot-starter-web, spring-boot-starter-security, mybatis-spring-boot-starter, and a database driver), or (b) clarify in the documentation that the current commit is a bare-bones scaffold and these features will be added in follow-up PRs.

Also applies to: 122-128

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/02_ARCHITECTURE.md` around lines 36 - 42, The architecture documentation
describes a layered stack with MyBatis DAO pattern, Spring Security, REST
controllers, and database connectivity, but pom.xml only contains
spring-boot-starter and spring-boot-starter-test without any of the specific
framework dependencies referenced in the docs. To fix this mismatch, either add
the missing dependencies to pom.xml (spring-boot-starter-web,
spring-boot-starter-security, mybatis-spring-boot-starter, and a database driver
like spring-boot-starter-data-jpa or a specific DB driver) to match the
documented architecture, or update the architecture documentation to clarify
that the current commit is a bare-bones scaffold and these features will be
added in follow-up PRs.
🧹 Nitpick comments (1)
docs/02_ARCHITECTURE.md (1)

36-42: ⚡ Quick win

Clarify the scope of the current architectural scaffold relative to planned implementation.

The architecture document (lines 36–42, 122–128) describes a complete three-layer Spring Boot design (Controller → Service → DAO with MyBatis) and infrastructure (Spring Security, database tables, batch jobs), but the accompanying pom.xml is a minimal scaffold without any of these dependencies.

While it's clear from the PR objectives that this is foundational work, the mismatch between the aspirational architecture diagram and the actual buildable configuration could mislead developers about what is currently available. Consider adding a note to the architecture document (e.g., "Phase 1 Scaffold" vs. "Planned Full Stack") to clarify that the detailed design describes the target state, not the current state.

Alternatively, if the team plans to add all the described dependencies (database driver, MyBatis, Spring Security, Spring Web) in the next PR, explicitly document that as a known follow-up so reviewers and developers understand the phased approach.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/02_ARCHITECTURE.md` around lines 36 - 42, Add clarification to the
architecture document (docs/02_ARCHITECTURE.md) to distinguish between the
current state and the planned target state. Insert a note near the architecture
diagram sections (around lines 36-42 and 122-128) that clearly labels the
described three-layer design, security configuration, and MyBatis components as
"Planned Full Stack" or "Phase 2 Implementation" rather than current
capabilities. Alternatively, if this is intentionally a phased approach, add an
explicit section documenting that the dependencies described in the architecture
(database driver, MyBatis, Spring Security, Spring Web) are planned follow-ups
and will be integrated in subsequent PRs. This helps developers understand what
is actually available in the current minimal scaffold versus what will be added
next.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/.mvn/wrapper/maven-wrapper.properties`:
- Around line 1-3: The maven-wrapper.properties file lacks integrity
verification for the downloaded Maven distribution, creating a supply-chain
security gap. Add a distributionSha512Sum property to the file with the official
SHA512 checksum from
https://downloads.apache.org/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.zip.sha512
to enable checksum validation. This aligns with Maven wrapper best practices and
ensures the downloaded archive matches the official distribution for Maven
3.9.16.

In `@backend/pom.xml`:
- Around line 33-36: The pom.xml file currently declares only the
spring-boot-starter dependency, but the backend is a REST API service that
requires web functionality. Change the artifactId from spring-boot-starter to
spring-boot-starter-web in the dependency block around line 35. This will
provide the necessary Spring Web/MVC functionality and embedded servlet
container required for the REST controller endpoints documented in the
architecture.

---

Outside diff comments:
In `@docs/02_ARCHITECTURE.md`:
- Around line 36-42: The architecture documentation describes a layered stack
with MyBatis DAO pattern, Spring Security, REST controllers, and database
connectivity, but pom.xml only contains spring-boot-starter and
spring-boot-starter-test without any of the specific framework dependencies
referenced in the docs. To fix this mismatch, either add the missing
dependencies to pom.xml (spring-boot-starter-web, spring-boot-starter-security,
mybatis-spring-boot-starter, and a database driver like
spring-boot-starter-data-jpa or a specific DB driver) to match the documented
architecture, or update the architecture documentation to clarify that the
current commit is a bare-bones scaffold and these features will be added in
follow-up PRs.

---

Nitpick comments:
In `@docs/02_ARCHITECTURE.md`:
- Around line 36-42: Add clarification to the architecture document
(docs/02_ARCHITECTURE.md) to distinguish between the current state and the
planned target state. Insert a note near the architecture diagram sections
(around lines 36-42 and 122-128) that clearly labels the described three-layer
design, security configuration, and MyBatis components as "Planned Full Stack"
or "Phase 2 Implementation" rather than current capabilities. Alternatively, if
this is intentionally a phased approach, add an explicit section documenting
that the dependencies described in the architecture (database driver, MyBatis,
Spring Security, Spring Web) are planned follow-ups and will be integrated in
subsequent PRs. This helps developers understand what is actually available in
the current minimal scaffold versus what will be added next.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b378893-613c-48c6-a62e-7ae18cbfd372

📥 Commits

Reviewing files that changed from the base of the PR and between b2e9f27 and 14b10f7.

⛔ Files ignored due to path filters (12)
  • backend/target/classes/com/ssafy/salmanApp/model/dao/BasicHouseDealDAO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/dao/BasicHouseInfoDAO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/dao/HouseDealDAO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/dao/HouseInfoDAO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/dto/HouseDealDTO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/dto/HouseInfoDTO.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/service/BasicHouseService.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/model/service/HouseService.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/test/HouseDealTest.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/test/HouseInfoTest.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/test/TXTest.class is excluded by !**/*.class
  • backend/target/classes/com/ssafy/salmanApp/util/DBUtil.class is excluded by !**/*.class
📒 Files selected for processing (27)
  • backend/.classpath
  • backend/.gitattributes
  • backend/.gitignore
  • backend/.mvn/wrapper/maven-wrapper.properties
  • backend/.project
  • backend/.settings/org.eclipse.jdt.apt.core.prefs
  • backend/.settings/org.eclipse.jdt.core.prefs
  • backend/.settings/org.eclipse.m2e.core.prefs
  • backend/mvnw
  • backend/mvnw.cmd
  • backend/pom.xml
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/BasicHouseDealDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/BasicHouseInfoDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/HouseDealDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/HouseInfoDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dto/HouseDealDTO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dto/HouseInfoDTO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/service/BasicHouseService.java
  • backend/src/main/java/com/ssafy/salmanApp/model/service/HouseService.java
  • backend/src/main/java/com/ssafy/salmanApp/test/HouseDealTest.java
  • backend/src/main/java/com/ssafy/salmanApp/test/HouseInfoTest.java
  • backend/src/main/java/com/ssafy/salmanApp/test/TXTest.java
  • backend/src/main/java/com/ssafy/salmanApp/util/DBUtil.java
  • backend/src/main/java/com/ssafy/salmanhae/SalmanhaeApplication.java
  • backend/src/main/resources/application.properties
  • backend/src/test/java/com/ssafy/salmanhae/SalmanhaeApplicationTests.java
  • docs/02_ARCHITECTURE.md
💤 Files with no reviewable changes (17)
  • backend/.settings/org.eclipse.jdt.core.prefs
  • backend/.settings/org.eclipse.m2e.core.prefs
  • backend/src/main/java/com/ssafy/salmanApp/test/HouseInfoTest.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dto/HouseInfoDTO.java
  • backend/.settings/org.eclipse.jdt.apt.core.prefs
  • backend/.classpath
  • backend/src/main/java/com/ssafy/salmanApp/util/DBUtil.java
  • backend/src/main/java/com/ssafy/salmanApp/test/HouseDealTest.java
  • backend/.project
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/HouseInfoDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/HouseDealDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/service/HouseService.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dto/HouseDealDTO.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/BasicHouseInfoDAO.java
  • backend/src/main/java/com/ssafy/salmanApp/test/TXTest.java
  • backend/src/main/java/com/ssafy/salmanApp/model/service/BasicHouseService.java
  • backend/src/main/java/com/ssafy/salmanApp/model/dao/BasicHouseDealDAO.java

Comment on lines +1 to +3
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

dist_url="$(awk -F= '/^distributionUrl=/{print $2}' backend/.mvn/wrapper/maven-wrapper.properties)"
tmp_dir="$(mktemp -d)"
trap 'rm -rf "$tmp_dir"' EXIT

curl -fsSL "$dist_url" -o "$tmp_dir/maven-dist.zip"
local_sha="$(sha256sum "$tmp_dir/maven-dist.zip" | awk '{print $1}')"
echo "local_sha256=$local_sha"

if curl -fsSL "${dist_url}.sha256" -o "$tmp_dir/remote.sha256"; then
  remote_sha="$(awk '{print $1}' "$tmp_dir/remote.sha256" | tr -d '\r\n')"
  echo "remote_sha256=$remote_sha"
  [ "$local_sha" = "$remote_sha" ] && echo "checksum_match=true" || echo "checksum_match=false"
else
  echo "No remote .sha256 file found at ${dist_url}.sha256; fetch checksum from official Maven release metadata before pinning."
fi

Repository: ssafy-salman/salmanhae

Length of output: 116


🏁 Script executed:

if [ -f backend/.mvn/wrapper/maven-wrapper.properties ]; then
  cat -n backend/.mvn/wrapper/maven-wrapper.properties
else
  echo "File not found"
fi

Repository: ssafy-salman/salmanhae

Length of output: 255


🌐 Web query:

Maven 3.9.16 official release sha256 checksum central repository

💡 Result:

Apache Maven 3.9.16 does not provide sha256 checksums in its official distribution directory [1][2]. Instead, the Apache Maven project provides sha512 checksums for its release artifacts [1][3]. You can find the official sha512 checksum files at the following location: https://downloads.apache.org/maven/maven-3/3.9.16/binaries/ The available files for verification in that directory are: - apache-maven-3.9.16-bin.tar.gz.sha512 [1] - apache-maven-3.9.16-bin.zip.sha512 [1] The Apache Maven team also strongly recommends verifying the PGP signatures (.asc files) of the release bundles against their public KEYS for security [4].

Citations:


🌐 Web query:

Maven wrapper distributionSha256Sum distributionSha512Sum supported properties

💡 Result:

The Maven Wrapper supports checksum verification to prevent supply-chain attacks by ensuring that downloaded binaries are not corrupted [1][2]. This verification is configured by adding specific properties to the maven-wrapper.properties file [1][3]. The supported checksum properties are: 1. distributionSha512Sum: Used to verify the integrity of the downloaded Maven distribution [4][5]. This was introduced because official Maven distributions provide SHA-512 checksums [4][6]. 2. wrapperSha512Sum: Used to verify the integrity of the maven-wrapper.jar file [4][5]. 3. distributionSha256Sum: An older property used to verify the Maven distribution using a SHA-256 checksum [7][1]. 4. wrapperSha256Sum: An older property used to verify the maven-wrapper.jar file using a SHA-256 checksum [7][1]. While the SHA-256 properties (distributionSha256Sum and wrapperSha256Sum) remain available for backward compatibility, the SHA-512 variants are preferred because they align with the checksums officially published by the Maven project [4][5]. The checksum values should be provided in hex notation, using only lowercase characters [1][3].

Citations:


Use distributionSha512Sum instead of distributionSha256Sum for Maven 3.9.16 integrity verification.

The file lacks a checksum property, so the Maven wrapper skips integrity validation of the downloaded archive—a supply-chain hardening gap. Apache Maven 3.9.16 does not publish SHA256 checksums; it officially provides SHA512 checksums at https://downloads.apache.org/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.zip.sha512. Use distributionSha512Sum to align with the official distribution and Maven wrapper best practices.

🔧 Suggested change
 wrapperVersion=3.3.4
 distributionType=only-script
 distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
+distributionSha512Sum=<sha512_from_official_maven_release>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/.mvn/wrapper/maven-wrapper.properties` around lines 1 - 3, The
maven-wrapper.properties file lacks integrity verification for the downloaded
Maven distribution, creating a supply-chain security gap. Add a
distributionSha512Sum property to the file with the official SHA512 checksum
from
https://downloads.apache.org/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.zip.sha512
to enable checksum validation. This aligns with Maven wrapper best practices and
ensures the downloaded archive matches the official distribution for Maven
3.9.16.

Comment thread backend/pom.xml
Comment on lines 33 to 36
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.3.0</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "[POM starters]"
rg -n "<artifactId>spring-boot-starter(-web|-test)?</artifactId>" backend/pom.xml

echo
echo "[Backend contract clues]"
rg -n "spring-boot:run|REST|controller|Spring Boot 3" README.md docs/02_ARCHITECTURE.md

Repository: ssafy-salman/salmanhae

Length of output: 821


Use spring-boot-starter-web for the backend scaffold baseline.

Line 35 currently declares spring-boot-starter only. The backend is documented as a REST API service (with REST endpoints in the controller directory per architecture documentation), but spring-boot-starter-web is missing from the baseline dependencies. This is required for Spring Web/MVC functionality and the embedded servlet container needed for REST controller operations.

🔧 Suggested change
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter</artifactId>
+			<artifactId>spring-boot-starter-web</artifactId>
 		</dependency>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/pom.xml` around lines 33 - 36, The pom.xml file currently declares
only the spring-boot-starter dependency, but the backend is a REST API service
that requires web functionality. Change the artifactId from spring-boot-starter
to spring-boot-starter-web in the dependency block around line 35. This will
provide the necessary Spring Web/MVC functionality and embedded servlet
container required for the REST controller endpoints documented in the
architecture.

@crolvlee
crolvlee merged commit 7ae61f8 into develop Jun 15, 2026
1 check passed
@crolvlee
crolvlee deleted the chore/3-backend-setup branch June 15, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] 백엔드 세팅

1 participant