Solution: rebuild the module and test again
when testing the Dubbo provider, adding @ service under the Dubbo path to the business implementation code will report that a test class is not injected
org.springframework.beans.factory.unsatisfied dependencyexception: error creating bean with name ‘com.tanhua.dubbo.server.api.testrecommenduserapi XXXXXX,
No qualifying bean of type ‘com. Tanhua. Dubbo. Server. API. Recommenduserapi’ available: (I think the interface recommenduserapi was not injected), so I replaced it with spring’s @ service line; But shouldn’t Dubbo’s @ service have spring’s @ service function?Baidu for a long time did not belong to their correct answer; After carefully checking the scan package, the annotation @ runwith (springrunner. Class) @ springboottest
on the test class has been added, and the @ service under Dubbo still reports an error
at last, the module was simply rebuilt by copying and pasting, and the final test was successful!! But what’s wrong?I don’t know. Maybe it’s related to building a module! Hope it works…
Read More:
- Why not manage controller in spring container
- [Solved] Error in registering Eureka for spring cloud micro service: classnotfoundexception: org.apache.http.conn.scheme.schemeregistry
- Spring boot project running error: Servlet.service () for servlet [dispatcherServlet] threw exception
- nt service 1072 No need to restart, repeat the method of installing the service program or service driver
- Dubbo SPI custom equalization policy error
- After introducing security, the service cannot be registered with Eureka
- An error is reported in the spring cloud setup. Autowired appears and Eureka cannot be registered
- [Solved] nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t o invoke the method findPage
- Error running docker container: starting container process caused “exec: \“python\“: executable file
- Try not to use @reference after using Dubbo, which may cause conflicts
- Systemctl command doesn’t exist. How to solve the problem that the service can’t be started
- Spring AOP uses AspectJ to report an exception that ‘the reference to the bean “mypointcut” cannot be resolved’
- Get connection timeout retry: 1 MySQL errorcode 0, state 08s01 docker container accessing MySQL container is very slow and sometimes interrupted
- The spring boot set appears in the stand-alone version of redis Servlet.service () for servlet [dispatcherServlet] in context with path [] thr
- Centos7 executes the command service mysqld start and prompts Failed to start mysqld.service: Unit mysqld.service not loaded
- Spring initializer error: initialization failed for ‘ https://start.spring.io ‘
- Job for apache2.service failed apache2 cannot be started
- Install / Remove of the Service denied! Error occurred when installing MySQL service
- Apache service can’t be started under xampp, reporting port occupancy class error [error] Apache will not start without the configured ports free!
- Apache2 cannot be started and an error is reported for apache2.service failed because the control process exited with error code.