Conversation
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…, auth, layering) Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documentation-only refresh. No Java, SQL, schema, or build changes.
Reviewed:
build.gradle/ Gradle wrapper,application*.properties, REST controllers and security (io.spring.api), DGS fetchers/mutations andschema.graphqls(io.spring.graphql), domain (io.spring.core), command/query services and pagination (io.spring.application), MyBatis repositories/read services/mapper XML (io.spring.infrastructure), Flyway migration, tests.Docs changed:
README.md— rewritten. The old README described the project as "Kotlin and Spring" (it is Java 11 source / Gradle 7.4 / Spring Boot 2.6.3). Now has an accurate stack + version table, setup/run/test/format commands, SQLite (dev.db, deleted by./gradlew clean; in-memory under thetestprofile, exceptRealworldApplicationTestswhich boots againstdev.db) and Flyway notes, package layout, REST + GraphQL overviews, JWT auth notes, and a warning thatio.spring.graphqltypes underbuild/generatedare DGS-codegen output and must not be hand-edited.docs/architecture.md(new) — intended layering (api/graphql→application→core←infrastructure, noting the read-side leak whereapplicationimportsinfrastructure.mybatis.readservice.*), CQRS-lite write path (entities + repository interfaces) vs read path (*DataDTOs via*ReadService), offset vs Relay cursor pagination (DateTimeCursor=createdAtepoch ms), security/route rules, error formats, persistence, generated sources, test layout.docs/api.md(new) — full REST endpoint reference (no/apiprefix;Authorization: Token <jwt>;offset/limitdefault0/20), error format, and GraphQL query/mutation reference with [REDACTED SECRET]s.Verification:
./gradlew compileJava compileTestJava(JDK 17) — passes../gradlew spotlessJavaCheck— see follow-ups; failures are pre-existing and reproduce on untouchedmaster.Recommended follow-ups (not changed here)
:spotlessJavafails withInvocationTargetException(google-java-format via Spotless 6.2.1 needs JDK 11 or--add-exportsflags). On JDK 11 it runs but reports a pre-existing format violation insrc/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java. RunspotlessJavaApplyon JDK 11 or bump Spotless/google-java-format.meandupdateUserreturnnull,feedpasses a null user down and fails with a genericINTERNALerror, onlyloginraises a typedUNAUTHENTICATED.MeDatafetcheralso echoes the rawAuthorizationheader back astoken.io.spring.graphql.exception.AuthenticationExceptionis not handled byGraphQLCustomizeExceptionHandler(onlyInvalidAuthenticationExceptionis mapped toUNAUTHENTICATED), so it surfaces as a generic DGSINTERNALerror.first/lastexclusivity is not enforced (both accepted,firstwins; error message is in Chinese), andCommentReadService.findByArticleIdWithCursorapplies the cursor but noLIMIT, soArticle.commentsignores page size.JwtTokenFilterdoesheader.split(" ")[1]with no length check — a header likeToken(no value) throwsArrayIndexOutOfBoundsExceptioninstead of being ignored.applicationquery services depend directly oninfrastructure.mybatis.readservice.*; moving those interfaces intoapplicationwould restore the intended dependency direction.RealworldApplicationTestsruns without thetestprofile, so./gradlew testtouches the realdev.dbfile.*origins with all methods inWebSecurityConfig— fine for a demo, but worth noting.java.time).jwt.secretis committed inapplication.properties; should be externalised for anything beyond local dev.ankehao-demo/spring-boot-realworld-[REDACTED SECRET]-app, which was not accessible; this PR targets theCOG-GTMfork.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/585ab08bbd78428091e7d62db4ac3a39
Open in Devin Desktop: https://app.devin.ai/desktop/session/585ab08bbd78428091e7d62db4ac3a39?variant=devin
Requested by: @lburgers