In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Background
As the main means of back-end service load and front-end separation, dubbo has a relatively high utilization rate in the industry. With the increase of Dubbo system, there is trouble in local development and debugging.
Directly start the same service locally in the developer
Because Dubbo adopts the strategy of load balancer, it always goes to the local service at random in the case of multiple requests, which is somewhat life-saving.
Modify Group
As a sub-Group strategy supported by Dubbo, it is feasible to register individual developers to a Gruop independently. This requires simultaneous changes on the consumer side and the provider side, which is a bit of a hassle.
And you will want to register a list of services in the registry.
Directly connected
Direct connection means that the service is not registered with the registry to prevent Dubbo requests from the test environment from being assigned to the local development server.
1. Modify the service provider configuration file
Among them, register= "false" is the main configuration that works. What he means is that if you start the service locally, you do not want to register the service in the registry.
This block will be configured in filter later. Dev. properties defaults to false,test without true by default. Deploy the configuration file of test in the test environment later
2. Add the default directly connected profile
The ${user.home} / dubbo-resolve.properties file is automatically loaded in version 2.0 and no configuration is required.
${user.home} refers to the current operating system user directory, for example, the user directory of Win7 system Administrator is C:\ Users\ Administrator
Mac is / Users/luoaz or something.
The configuration is as follows
Com.ai.trial.modules.trial.service.TlAccusedProcessService=dubbo://localhost:21006com.ai.trial.modules.trial.service.TlProcessService=dubbo://localhost:21006
Through the above configuration, the specified service will not be found in the registry, but directly request the configuration path, dubbo://localhost:21006, and then go to the configuration center for other unconfigured services.
This makes it easy to debug.
Ps: if you are lazy and easy, you can declare all the services, so you don't have to worry about it in the future.
The above Dubbo local development tips sharing is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.