Skip to content

Generic Type error in spring boot 3.4.1 #34166

Closed as not planned
Closed as not planned
@kumardhrubajyoti

Description

@kumardhrubajyoti

I ve below code :

@ResponseBody
public class ControllerGenericImpl<T extends EnterpriseEntity> implements ControllerGeneric<T> {
	
	@Autowired
	private ServiceGeneric<T> genericService;

getting error at ->
Field genericService in ControllerGenericImpl required a single bean, but 12 were found:
Action:

Consider marking one of the beans as @primary, updating the consumer to accept multiple beans, or using @qualifier to identify the bean that should be consumed.

This is coming in spring boot 3.4.1 in 3.4.0 or below it was working properly.

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