使用@Qualifier注解时候,报错:The annotation @Qualifier is disallowed for this location
报错 for The is 注解 this 时候 Location
2023-09-14 09:13:56 时间
问题描述:
在SpringBoot整合Druid数据库连接池时候,配置主从库数据源,使用@Qualifier注解进行注入Bean时候,编译错误,提示:
The annotation @Qualifier is disallowed for this location
错误原因:
- import导入的包错误,导入了:import org.mapstruct.Qualifier;
import org.mapstruct.Qualifier;
解决方案:
- 导入spring下的包
import org.springframework.beans.factory.annotation.Qualifier;
注意:eclipse使用快捷键【ctrl+shift+o】导入包的时候,多个包时候,会弹框提示,此时选择自己需要导入的包。
相关文章
- 访问swagger文档报错Illegal DefaultValue 1024 for parameter type integer,java.lang.NumberFormatException
- swagger报错 java.lang.NumberFormatException: For input string: ““
- ORA-19580: string conversation not active ORACLE 报错 故障修复 远程处理
- ORA-19634: file name required for this function ORACLE 报错 故障修复 远程处理
- ORA-24064: propagation for QUEUE string and DESTINATION string already enabled ORACLE 报错 故障修复 远程处理
- ORA-27461: The value for attribute string is too large. ORACLE 报错 故障修复 远程处理
- ORA-28086: The evaluation of the policy expression failed. string ORACLE 报错 故障修复 远程处理
- ORA-26942: LCR should not contain old value for column string in table string.string ORACLE 报错 故障修复 远程处理
- ORA-29985: Query Registration is only supported for automatic undo management ORACLE 报错 故障修复 远程处理
- ORA-30985: The virtual XMLType column for chaining is missing ORACLE 报错 故障修复 远程处理
- ORA-31503: invalid date supplied for begin_date or end_date ORACLE 报错 故障修复 远程处理
- ORA-31638: cannot attach to job string for user string ORACLE 报错 故障修复 远程处理
- ORA-31675: worker process interrupt for unexpected death of master process ORACLE 报错 故障修复 远程处理
- ORA-38708: not enough space for first flashback database log file ORACLE 报错 故障修复 远程处理
- ORA-39092: unable to set SCN metadata for object “string.string” of type string ORACLE 报错 故障修复 远程处理
- ORA-39788: Subtype “string”.”string” is specified multiple times for column string. ORACLE 报错 故障修复 远程处理
- ORA-44203: timeout waiting for lock on cursor ORACLE 报错 故障修复 远程处理
- ORA-48496: “string” is a mandatory keyword for the command ORACLE 报错 故障修复 远程处理
- ORA-55519: Supplemental logging not available for mining SCN range ORACLE 报错 故障修复 远程处理
- ORA-00401: the value for parameter string is not supported by this release ORACLE 报错 故障修复 远程处理
- ORA-13271: error allocating memory for geometry object ORACLE 报错 故障修复 远程处理
- ORA-14048: a partition maintenance operation may not be combined with other operations ORACLE 报错 故障修复 远程处理
- ORA-16264: invalid value for PREPARE_SERVERS parameter ORACLE 报错 故障修复 远程处理
- 遍历Oracle中用For反向遍历字符串的简单示例(oracle中for反向)