此处用了自己创建的两个模块,不同路径下,先导入了依赖 springbootimport2的User对象路径 springbootimport1的启动路径 1、首先是@Import(User.class) 获取单个Bean对象