java falco后夹器_java - Class doesn't contain matching constructor for autowiring

I have two classes

public abstract class AbstractDAO {

private final MyExecutor myExecutor;

private final Class clazz;

public AbstractDAO(MyExecutor myExecutor, Class clazz) {

this.myExecutor = myExecutor;

this.clazz = clazz;

}

}

and

@Component

public class MyDAOImpl extends AbstractDAO {

private final SessionManager sessionManager;

private final MyExecutor myExecutor;

@Autowired

public MyDAOImpl(SessionManager sessionManager, MyExecutor myExecutor) {

super(myExecutor, Manager.class);

this.sessionManager = sessionManager;

this.myExecutor= myExecutor;

}

}

I got an error at the definition of the abstract class saying that: "Class doesn't contain matching constructor for autowiring".

All I did is added an additional constructor parameter to the constructor of AbstractDAO which is a Class. I need this because I didn't find a way to detect this out from T at run time (stackflow search says there isn't one).

How can I fix this? How can I pass the Class information which can only be determined in the implementation class?c class Example { private final Logger logger; @Autowired public Example(final Logger logger) { this.logger = logger; }} I've found the FactoryBean class, which I've implemented. But the problem is that I cannot get any info

Many thanks

java

spring

dependency-injection

edited Feb 16 '14 at 16:17 asked Feb 16 '14 at 15:39

Kevin 1,469 7 36 60      It is a compile time error. No stack stace. Thanks. –

Kevin Feb 16 '14 at 15:44      You might want to read:

stackoverflow.com/questions/3153546/… and

stackoverflow.com/questions/19414734/spring-autowired-usage –

pedromss Feb 16 '14 at 16:28      Your code, as shown, compiles fine. –

Sotirios Delimanolis Feb 16 '14 at 17:26      It only compiles if I add a @Autowired in the constructor of the abstract class AbstractDAO. Otherwise, it won't. I want to know why it is like this. Many thanks. –

Kevin Feb 16 '14 at 17:28      I think you are misunderstanding what compilation is. Your error is not a compilation error (unless there is something seriously missing from your question). –

Sotirios Delimanolis Feb 16 '14 at 17:38

|

show more comment

1 Answers

1

---Accepted---Accepted---Accepted---

This is a bug in IntelliJ that is fixed in 13.1. http://youtrack.jetbrains.com/issue/IDEA-120977

answered Mar 9 '14 at 18:45

robert_difalco 2,378 1 16 34

|

A_UMBRELLA = ApplicationContextProvider.getApplicationContext().getBean(ParametrosInfraComponent.class) .findByIdParametroLikeAsMap("%UMBRELLA%"); private final HttpConnectionRest conexaoHttp; @Autowired @Qualifier

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要安装Sysdig Falco,您可以按照以下步骤进行操作: 1. 部署收集程序:使用以下命令在Docker中运行Falco收集程序,并指定展示程序地址: ``` docker run -d \ -p 2801:2801 \ --name falcosidekick \ -e WEBUI_URL=http://192.168.130.145:2802 \ falcosecurity/falcosidekick ``` 这将在Docker中启动Falco收集程序,并将展示程序地址设置为http://192.168.130.145:2802。# vim falco.yaml ...... json_output: true ...... http_output: enabled: true url: "http://192.168.130.145:2801/" user_agent: "falcosecurity/falco" [root@k8s-node1 falco# systemctl restart falco-custom ``` 这将修改Falco配置文件,使其以JSON格式输出,并启用HTTP输出,并将收集程序地址设置为http://192.168.130.145:2801。然后重新启动Falco服务。123 #### 引用[.reference_title] - *1* *3* [K8s进阶7——Sysdig、Falco、审计日志](https://blog.csdn.net/yi_qingjun/article/details/130260005)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item] - *2* [Sysdig Falco:你不可不知的Docker安全监控利器](https://blog.csdn.net/weixin_34376562/article/details/89594095)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值