Cannot be obtained by calling springboot API?

for example, an interface interface A,
when called by other classes,

 @Resource
 private IMessageHandler imessageHandler;

use both Resource and Autowired to indicate that the bean cannot be found

Jun.10,2022

the reason is that the implementation class of the interface is not annotated with @ Component, so just add it.


you can also use @ Service

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