Skip to content

A @Bean of Enum injection #710

Closed
@kliushnichenko

Description

@kliushnichenko

Given the following config:

public enum State {
    ON, OFF
}

@Factory
public class Configuration {

    @Bean
    public State state() {
        return State.ON;
    }

}

Later on, inject the State bean somewhere. The compilation is successful, but when the app is starting up:

Injecting null for ... when creating class .... - potential beans to inject: []. Check for missing module? [ missing beanScopeBuilder.modules() ]. If it is expected to be externally provided, missing beanScopeBuilder.bean() ?

did I miss something, or it's not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions