{"slug": "claude-writes-better-spring-boot-configs-than-your-senior-dev", "title": "Claude writes better Spring Boot configs than your senior dev", "summary": "Claude 3.5 Sonnet outperformed GPT-4o, Gemini 1.5 Pro, and DeepSeek-V3 in Spring Boot configuration and code generation tests on a legacy Java codebase, correctly identifying transaction boundaries and JPA annotations in 3/3 tests, while GPT-4o conflated annotations twice and Gemini suggested @EnableAutoConfiguration for everything. The author advises using Sonnet for module design and Angular scaffolding but writing Flyway migrations and Redis cache keys manually, noting that LLMs cannot replace architectural judgment.", "body_md": "# Claude writes better Spring Boot configs than your senior dev\n\n[Claude](/en/tags/claude/)as co-pilot isn't asking the right question. They're asking \"can I?\" when the real question is \"which model actually understands Spring Boot transaction boundaries without hallucinating a\n\n`@Transactional`\n\non a private method?\"I've benched all four majors against a nasty legacy Java codebase — 2,000 lines of spaghetti services, circular dependencies, and a `UserService`\n\nthat somehow manages payment processing. Here's what actually happened.\n\n**Architecture decisions: Claude 3.5 Sonnet > GPT-4o > Gemini 1.5 Pro > DeepSeek-V3**\n\n**Context retention on multi-file refactors:** Sonnet held 15-file context for 45 minutes. GPT-4o started forgetting package structures after file 8. Gemini hallucinated a`Repository`\n\ninterface that didn't exist.[DeepSeek](/en/tags/deepseek/)gave up and suggested rewriting in Go.**Spring Boot specifics:** Sonnet correctly identified`@EnableJpaRepositories`\n\nvs`@EntityScan`\n\nconfusion in 3/3 tests. GPT-4o conflated them twice. Gemini suggested`@EnableAutoConfiguration`\n\nas a fix for everything. DeepSeek didn't know`@Transactional`\n\npropagation types.**PostgreSQL schema design:** Sonnet produced a normalized schema with proper indexes and foreign keys on first try. GPT-4o forgot`ON DELETE CASCADE`\n\non a join table. Gemini suggested`JSONB`\n\nfor everything including primary keys. DeepSeek generated MySQL syntax.\n\n**Code generation: it's not even close**\n\n```\n# Prompt: \"Add optimistic locking to this JPA entity with version field\"\n```\n\n**Sonnet:** Added `@Version`\n\n, explained `OptimisticLockException`\n\nhandling in service layer, warned about detached entity merges.\n\n**GPT-4o:** Added `@Version`\n\n, missed the service-layer retry logic.\n\n**Gemini:** Added `@Version`\n\non a `String`\n\nfield. Compiled. Failed at runtime.\n\n**DeepSeek:** Added `@Version`\n\n, then rewrote the entire entity in Kotlin unprompted.\n\n**Where you still need a human (or at least a very careful prompt engineer)**\n\n**Redis cache invalidation strategies:** Every model suggests`@CacheEvict(allEntries = true)`\n\nlike it's free. It's not. Sonnet at least warns you when you ask for it on a 500k-entry cache.**Database migration ordering:** Flyway/Liquibase scripts generated by LLMs assume clean slate. They don't handle \"this column existed in prod for 3 years with nullable=true now you're making it not-null.\"**Angular change detection zones:** All four models default to`ChangeDetectionStrategy.Default`\n\nand wonder why your 500-row table lags. Sonnet is the only one that proactively suggests`OnPush`\n\n+`trackBy`\n\nwithout being asked.\n\n**My actual advice for this stack**\n\n1. **Let Sonnet design the Spring module boundaries** — feed it your domain description, ask for a package diagram with bounded contexts. It'll give you something defensible.\n\n2. **Write your own Flyway migrations** — LLMs don't know your production data.\n\n3. **Use Sonnet for Angular component scaffolding + OnPush patterns** — it genuinely understands the zone.js trap.\n\n4. **Redis? Write the cache keys yourself.** Naming conventions (`user:123:profile:v2`\n\n) are tribal knowledge no model has.\n\n5. **Hire a senior for 2 hours** — not for code, for a 30-minute architecture review and a 90-minute \"here's where you'll regret this in 6 months\" session. Worth every penny.\n\nThe app is buildable. The stack is fine. But don't pretend Claude replaces architectural judgment — it just makes the iteration loop tighter when you *have* judgment.\n\n[Next Kimi K3 Attention Residuals →](/en/threads/6947/)\n\n## All Replies （7）\n\nClaude's great for \"hey, what's this pattern called?\" or \"why's this failing?\" — but you still gotta drive. The magic happens when you stop treating it like a senior dev and start treating it like a rubber duck that actually talks back.\n\nJust ship something ugly first. Polish later.\n\n[@RayTinkerer](/en/users/RayTinkerer/)the cut-off killed me — what was the rest? \"what's the java equivalent of...\"\n\n*with*Claude. Ask for reasoning, justifications, first principles — make it explain the \"why\" behind every concept, even stuff unrelated to your app. Treat it like a sparring partner, not a code vending machine.\n\n*why*it works. If you skip that part, you're just building a house of cards.", "url": "https://wpnews.pro/news/claude-writes-better-spring-boot-configs-than-your-senior-dev", "canonical_source": "https://promptcube3.com/en/threads/6950/", "published_at": "2026-08-19 16:47:08+00:00", "updated_at": "2026-08-19 17:58:40.315645+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "developer-tools"], "entities": ["Claude 3.5 Sonnet", "GPT-4o", "Gemini 1.5 Pro", "DeepSeek-V3", "Spring Boot", "JPA", "Flyway", "Angular"], "alternates": {"html": "https://wpnews.pro/news/claude-writes-better-spring-boot-configs-than-your-senior-dev", "markdown": "https://wpnews.pro/news/claude-writes-better-spring-boot-configs-than-your-senior-dev.md", "text": "https://wpnews.pro/news/claude-writes-better-spring-boot-configs-than-your-senior-dev.txt", "jsonld": "https://wpnews.pro/news/claude-writes-better-spring-boot-configs-than-your-senior-dev.jsonld"}}