Spring boot injection into two-party package bean

Spring boot project has introduced a two-party package. Every time a class An in the two-party package is used, new A (), An itself is a normal class in the two-party package. There is no @ Component and other notes related to spring. If you want to annotate bean, in the spring boot project, how to inject it? please use A

as follows.
@Componet
private A a;

uses the following comments, adding @ ComponentScan to the startup app class, adding the path to the third-party package or reporting an error

@Configurable
public class Util{

@Bean
public A getA(){
    return new A();
}
}
Mar.22,2021

use the annotations Bean and Configuration

@Configuration
public class YourConfig{
    @Bean
    public A a(){
        return new A();
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e82a28-469b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e82a28-469b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?