摘要: @Qualifier注释用于在Spring中消除歧义,特别是在有多个候选Bean并且我们只想注入一个特定Bean时。 例如,假设我们有两个实现了同一接口的Bean,分别为"bean1"和"bean2",我们想在某个类中注入"bean1",我们可以在@Autowired注解中添加@Qualifier( 阅读全文
posted @ 2023-09-20 21:18 想去大上海 阅读(18) 评论(0) 推荐(0)
摘要: /** * 响应信息主体 * * @author ruoyi */ public class R<T> implements Serializable { private static final long serialVersionUID = 1L; /** * 成功 */ public stat 阅读全文
posted @ 2023-09-20 21:05 想去大上海 阅读(189) 评论(0) 推荐(0)
摘要: @Configuration @EnableAsync public class ExecutorConfig { private static final int poolSizeMin = 30; @Bean public Executor executor() { ThreadPoolTask 阅读全文
posted @ 2023-09-20 21:03 想去大上海 阅读(12) 评论(0) 推荐(0)
摘要: @Configuration @EnableScheduling public class ScheduleConfig implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegis 阅读全文
posted @ 2023-09-20 21:02 想去大上海 阅读(23) 评论(0) 推荐(0)
摘要: public class PropertiesUtil { private static final String Path = "config/param.properties"; /** * 读取配置文件中key的对应值 */ public static String queryValue(St 阅读全文
posted @ 2023-09-20 21:02 想去大上海 阅读(10) 评论(0) 推荐(0)
摘要: public class FolderV3Singleton { private FolderV3Singleton() { } private static class DeviceHolder { private static FolderV3Singleton ourInstance = ne 阅读全文
posted @ 2023-09-20 21:00 想去大上海 阅读(6) 评论(0) 推荐(0)