Java Spring Boot Config Standard

I have an interface hierarchy like this:

public interface Shape {
    //code
}

@Component
public class Circle implements Shape {
    //code
}

@Component
public class Square implements Shape {
    //code
}

I want to know the best way to wire these in using Spring Boot bean convention.

Solution 1:

@Component(value = "Circle")
public class Circle implements Shape {
    //code
}

@Component(value = "Square")
public class Square implements Shape {
    //code
}

@Configuration
public class ShapeConfig {
    @Bean
    Foo circleFoo(@Qualifiers("Circle") Shape shape) {
        return new Foo(shape);
    }

    @Bean
    Foo squareFoo(@Qualifiers("Square") Shape shape) {
        return new Foo(shape);
    }
}

Solution 2:

@Component
public class Circle implements Shape {
    //code
}

@Component
public class Square implements Shape {
    //code
}

@Configuration
public class ShapeConfig {
    @Bean
    Foo circleFoo(Circle shape) {
        return new Foo(shape);
    }

    @Bean
    Foo squareFoo(Square shape) {
        return new Foo(shape);
    }
}

What’s the best java/spring practice in this case? I find the value and @Qualifier stuff to be a bit verbose but I’m wondering if wiring in concrete implementations is frowned upon