diff --git a/AGENTS.md b/AGENTS.md index 08d42d49..5b75c894 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,38 +1,25 @@ # Repository Guidelines -## Project Structure & Module Organization -- Application code: `src/main/java/com/ycwl/basic/**` (controllers, services, mapper/repository, dto/model, config, util). -- Resources: `src/main/resources/**` (Spring configs, `mapper/*.xml`, static assets, logging). -- Tests: `src/test/java/**` mirrors main packages. -- Build output: `target/` (never commit). - ## Build, Test, and Development Commands - Build artifact: `mvn clean package` (tests are skipped by default via `pom.xml`). - Run locally (dev): `mvn spring-boot:run -Dspring-boot.run.profiles=dev`. - Run jar: `java -jar target/basic21-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev`. -- Execute tests: `mvn -DskipTests=false test` (note: `pom.xml` excludes `**/*Test.java` from test-compile; temporarily remove/override that config if you need to compile and run tests). +- Execute all tests: `mvn -DskipTests=false test` (note: `pom.xml` excludes `**/*Test.java` from test-compile; temporarily remove/override that config if you need to compile and run tests). +- Run single test: `mvn -DskipTests=false test -Dtest=ClassNameTest` (after removing testExcludes from maven-compiler-plugin). -## Coding Style & Naming Conventions +## Code Style Guidelines - Java 21. Use 4-space indentation; UTF-8; no wildcard imports. - Packages: `com.ycwl.basic.*`; classes PascalCase; methods/fields camelCase; constants UPPER_SNAKE_CASE. - Controllers in `controller`, business logic in `service`, persistence in `mapper` + `resources/mapper/*.xml`. - Prefer Lombok for boilerplate and constructor injection where applicable. +- Error handling: Use custom exceptions in `exception` package; proper logging with SLF4J. +- Testing: Spring Boot testing + JUnit; test names end with `Test` or `Tests` and mirror package structure. -## Testing Guidelines -- Framework: Spring Boot testing + JUnit (see `spring-boot-starter-test`). -- Test names end with `Test` or `Tests` and mirror package structure. -- Aim to cover service/util layers and critical controllers. No enforced coverage target. -- To enable tests locally, remove/override the `maven-compiler-plugin` `testExcludes` in `pom.xml` and run `mvn -DskipTests=false test`. - -## Commit & Pull Request Guidelines -- Follow Conventional Commits: `feat(scope): summary`, `fix(scope): summary`, `refactor: ...`. -- Reference issues (e.g., `#123`) and include brief rationale and screenshots for UI-facing changes. -- Keep PRs focused; include run/build instructions and any config changes. - -## Security & Configuration Tips -- Profiles: `application.yml` and `bootstrap.yml` with `-dev`/`-prod` variants. Select via `--spring.profiles.active`. -- Do not commit secrets. Provide Nacos, Redis, MySQL, OSS/S3, and 3rd‑party keys via environment or secure config. -- Review `logback-spring*.xml` before raising log levels in production. +## Project Structure +- Application code: `src/main/java/com/ycwl/basic/**` (controllers, services, mapper/repository, dto/model, config, util). +- Resources: `src/main/resources/**` (Spring configs, `mapper/*.xml`, static assets, logging). +- Tests: `src/test/java/**` mirrors main packages. +- Build output: `target/` (never commit). ## Agent-Specific Notes - Keep changes minimal and within existing package boundaries. diff --git a/CLAUDE.md b/CLAUDE.md index 08d42d49..5b75c894 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,38 +1,25 @@ # Repository Guidelines -## Project Structure & Module Organization -- Application code: `src/main/java/com/ycwl/basic/**` (controllers, services, mapper/repository, dto/model, config, util). -- Resources: `src/main/resources/**` (Spring configs, `mapper/*.xml`, static assets, logging). -- Tests: `src/test/java/**` mirrors main packages. -- Build output: `target/` (never commit). - ## Build, Test, and Development Commands - Build artifact: `mvn clean package` (tests are skipped by default via `pom.xml`). - Run locally (dev): `mvn spring-boot:run -Dspring-boot.run.profiles=dev`. - Run jar: `java -jar target/basic21-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev`. -- Execute tests: `mvn -DskipTests=false test` (note: `pom.xml` excludes `**/*Test.java` from test-compile; temporarily remove/override that config if you need to compile and run tests). +- Execute all tests: `mvn -DskipTests=false test` (note: `pom.xml` excludes `**/*Test.java` from test-compile; temporarily remove/override that config if you need to compile and run tests). +- Run single test: `mvn -DskipTests=false test -Dtest=ClassNameTest` (after removing testExcludes from maven-compiler-plugin). -## Coding Style & Naming Conventions +## Code Style Guidelines - Java 21. Use 4-space indentation; UTF-8; no wildcard imports. - Packages: `com.ycwl.basic.*`; classes PascalCase; methods/fields camelCase; constants UPPER_SNAKE_CASE. - Controllers in `controller`, business logic in `service`, persistence in `mapper` + `resources/mapper/*.xml`. - Prefer Lombok for boilerplate and constructor injection where applicable. +- Error handling: Use custom exceptions in `exception` package; proper logging with SLF4J. +- Testing: Spring Boot testing + JUnit; test names end with `Test` or `Tests` and mirror package structure. -## Testing Guidelines -- Framework: Spring Boot testing + JUnit (see `spring-boot-starter-test`). -- Test names end with `Test` or `Tests` and mirror package structure. -- Aim to cover service/util layers and critical controllers. No enforced coverage target. -- To enable tests locally, remove/override the `maven-compiler-plugin` `testExcludes` in `pom.xml` and run `mvn -DskipTests=false test`. - -## Commit & Pull Request Guidelines -- Follow Conventional Commits: `feat(scope): summary`, `fix(scope): summary`, `refactor: ...`. -- Reference issues (e.g., `#123`) and include brief rationale and screenshots for UI-facing changes. -- Keep PRs focused; include run/build instructions and any config changes. - -## Security & Configuration Tips -- Profiles: `application.yml` and `bootstrap.yml` with `-dev`/`-prod` variants. Select via `--spring.profiles.active`. -- Do not commit secrets. Provide Nacos, Redis, MySQL, OSS/S3, and 3rd‑party keys via environment or secure config. -- Review `logback-spring*.xml` before raising log levels in production. +## Project Structure +- Application code: `src/main/java/com/ycwl/basic/**` (controllers, services, mapper/repository, dto/model, config, util). +- Resources: `src/main/resources/**` (Spring configs, `mapper/*.xml`, static assets, logging). +- Tests: `src/test/java/**` mirrors main packages. +- Build output: `target/` (never commit). ## Agent-Specific Notes - Keep changes minimal and within existing package boundaries. diff --git a/src/main/java/com/ycwl/basic/repository/ScenicRepository.java b/src/main/java/com/ycwl/basic/repository/ScenicRepository.java index 0e412759..b4e92196 100644 --- a/src/main/java/com/ycwl/basic/repository/ScenicRepository.java +++ b/src/main/java/com/ycwl/basic/repository/ScenicRepository.java @@ -59,6 +59,7 @@ public class ScenicRepository { return scenicEntity; } + @Deprecated public ScenicConfigEntity getScenicConfig(Long scenicId) { ScenicConfigManager scenicConfigManager = getScenicConfigManager(scenicId); ScenicConfigEntity config = new ScenicConfigEntity();