Implementing the hexagonal architecture, first pain point, Claude's cutoff date

AI-assisted coding is sometimes two steps forward, one step back. This post is about recognizing where LLM knowledge cutoff dates and a new major version collide. In an earlier post, I insisted on using Spring Boot 4+ instead of the suggested version 3.4.2. Claude's knowledge cutoff is May 2025, but Spring Boot 4.0.0 wasn't released until November 20, 2025—meaning the model had never seen it.

Version 4 introduced several breaking changes from earlier Spring Boot versions. One specific example: configuring Flyway for database migrations. This post shows the correct approach. Only these three imports are required (from GitHub: adapter-persistence/pom.xml):


      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-flyway</artifactId>
      </dependency>
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-database-postgresql</artifactId>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
      </dependency>
    

Add the migration scripts with the Flyaway naming conventions to the default location and you are ready:

services/adapter-persistence/src/main/resources/db/migration

No additional configuration is needed in application.properties. Flyway auto-configuration handles it by default.

The Lesson

AI coding assistants are trained on content before a cutoff date. When a software framework like Spring Boot introduces breaking changes, the coding assistant's applies old (pre-cutoff date) solutions that don't work. The "collaboration" session configuring persistence in my Spring Boot application was a frustrating waste of time and tokens. When something this fundamental isn't working and the assistant keeps suggesting another "quick fix"... Stop. RTFM. The answer was in the Spring Boot 4.0 Migration Guide, ready for any human alive after May 2025 to read.

Prompts Used (full transcript):

  • "we are going to start living the hexagonal architecture as well as domain driven design. The domain should contain the objects that follow the principles of domain driven design. In the package com.javablog.domain.blog create the following records: Post(), Comment(). Create a BlogRepository to listPosts() and listComments(Post). Implement the repository in the adapter-persistence in the package com.javablog.adapter.persistence.blog. Note, use named queries that are anchored in the Entity object that lives in the adapter-persistence. Create a PostEntity and CommentEntity in the same package as the BlogRepository. Each entity will have UUID as its identifier. Each entity will have a content member that contains text or varchar with the maximum allowed. Do not use Clobs, Blobs - we will get to that later."
  • [Multiple iterations of Claude adding flyway-core, configuration beans, and property changes—none worked]
  • "no, you're hacking - admit you don't know what you are doing"
  • "delete your hack. wait for further instruction."
  • "well, I fixed it by reading the documentation. you see in spring 4+ the old paradigm on which you were trained was changed. note the changes and create a skeleton blog post 5 based upon it."
  • "I will post this entry tomorrow. In the future, do not write the content for me - that too is wrong."
  • "no, you've done enough today"
  • "what is your knowledge cutoff date"

Comments

Comments are for feedback on this specific post. For general questions, please use Stack Overflow. Comments may be removed after one year.

No comments yet. Be the first to share your thoughts!