Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Annotated storage bean not found when using Spring Boot DevTools RestartClassLoader #517

@magneticflux-

Description

@magneticflux-

Environment Details

  • MicroStream Version: 08.00.00-MS-EA2
  • JDK version: 17
  • OS: Windows 11
  • Used frameworks: Spring Boot

Describe the bug

When using the "restart" feature of Spring Boot DevTools, the generated bean for my @Storage class is not autowired.

To Reproduce

  1. Generate a Spring Boot starter project including Spring Boot DevTools using start.spring.io
  2. Add MicroStream Spring integration dependencies
  3. Create a @Storage class and have it injected/autowired to something at startup
  4. Launch the application with the added parameter -Dspring.devtools.restart.trigger-file=.restartTriggerFile (this is added by IntelliJ automatically if you set the run configuration's On 'Update' action: property to Hot swap classes and update trigger file if failed (this flag isn't needed, Spring always uses a RestartClassLoader when spring-boot-devtools is on the classpath)

Expected behavior

The bean should be resolved properly

Additional context

I suspect a class loading issue. I'm going to debug this on my own and I'll update with my findings or PR with a solution in an hour or two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions