找不到自动接线的Bean,SpringBoot

我正在学习Spring Boot,并构建了一个简单的“示例”应用程序,但无法将不同的组件一起注入。

I get Field b in ca.company.hello.A required a bean of type 'ca.company.hello.B' that could not be found.

这是我的配置:

@Configuration
public class Config {

    @Bean
    public B b() {
        return new B();
    }

}

Here is how I use the class B:

@Component
public class A {
    @Autowired
    private B b;

    @Value("Covid 19")
    private String calamity;

    public void speak() {
        b.writeToScreen(this.calamity);
    }
}

Can someone tell me please, how do I inject class B correctly into the field b in class A above?

附言

这是我的项目的包结构:

enter image description here

这是我的主要内容:

@SpringBootApplication
public class Helloer {

    public static void main(String[] args) {
        SpringApplication.run(A.class, args);
        A a = new A();
        a.speak();
    }
}

谢谢!