We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
将example-plugin-b-v3-self案例的jar包复制到exp-plugins目录下后,在main方法中使用插件,如下: optional = expAppContext.get(UserService.class.getName(), "cn.think.in.java.open.exp.example.bv3_3.0.0"); optional.ifPresent(userService -> { log.info("example.plugin.a_1.0.0--->userService.getClass().getName()={}", userService.getClass().getName()); userService.createUserExt(); }); 然后出现以下异常: Exception in thread "main" java.lang.ClassCastException: cn.think.in.java.open.exp.example.bv3.UserPlugin cannot be cast to cn.think.in.java.open.exp.adapter.springboot2.example.UserService at java.util.Optional.ifPresent(Optional.java:159) at cn.think.in.java.simple.app.example.SimpleJavaAppMain.main(SimpleJavaAppMain.java:32)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
将example-plugin-b-v3-self案例的jar包复制到exp-plugins目录下后,在main方法中使用插件,如下:
optional = expAppContext.get(UserService.class.getName(), "cn.think.in.java.open.exp.example.bv3_3.0.0");
optional.ifPresent(userService -> {
log.info("example.plugin.a_1.0.0--->userService.getClass().getName()={}", userService.getClass().getName());
userService.createUserExt();
});
然后出现以下异常:
Exception in thread "main" java.lang.ClassCastException: cn.think.in.java.open.exp.example.bv3.UserPlugin cannot be cast to cn.think.in.java.open.exp.adapter.springboot2.example.UserService
at java.util.Optional.ifPresent(Optional.java:159)
at cn.think.in.java.simple.app.example.SimpleJavaAppMain.main(SimpleJavaAppMain.java:32)
The text was updated successfully, but these errors were encountered: