Spring cannot scan the jar package it packed.

want to do this
use @ Autowired to inject a map in the service layer
let Spring scan automatically, and use key to fetch the injected classes in map, which is equivalent to policy mode

.

the newly added module is annotated with @ Service ("key")

without maven
use the command line to add the newly added module

jar crf extra.jar com/xxx/xxx/* com/xxx/xxx/test.class

package it into a Jar package and throw it into the lib folder of the project in tomcat. Do you want Spring to scan
but not
because you want MANIFAST.mf to write those dependencies?
there is still a problem with the idea

Apr.13,2022

does not scan, and Spring scans packages under the root of the project (where the Application class resides) by default.
if you want to import an external class, you need to indicate it with @ Import or @ ComponentScan in the Application class (or any other @ component class).

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-1bf69ea-3a3cd.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-1bf69ea-3a3cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?