Skip to content

Rules do not scan dependency injection without a handler #35

Open
@maschnetwork

Description

@maschnetwork

Problem: You can run standard Spring Boot applications via the Serverless Java Container or the Lambda Web Adapter. In that case, no specific handler interface needs to be implemented. Currently the SnapStart rules would therefore not recognize any violation of the rules:

public class UnicornControllerHandler {

    private final UnicornService unicornService;
    private final UUID uuid;
    private static final Logger logger = LoggerFactory.getLogger(UnicornControllerHandler.class);

    public UnicornControllerHandler(UnicornService unicornService) {
        this.unicornService = unicornService;
        uuid = UUID.randomUUID();
    }
}

This is somehow related to #24 but the checks seem to only apply when the class and the method have a specific name.

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