package demo.spring.boot.dubbo.api;
public interface GreetingService {
String welcome(String name);
}
2 demo-spring-boot-dubbo-provider
2.1 POM 文件,注意添加 dubbo-spring-boot-starter 依赖
4.0.0demo.spring.boot.dubbodemo-spring-boot-dubbo-provider0.0.1-SNAPSHOTjardemo-spring-boot-dubbo-providerDemo project for Spring Bootorg.springframework.bootspring-boot-starter-parent2.0.4.RELEASEUTF-8UTF-81.8org.springframework.bootspring-boot-startercom.alibaba.bootdubbo-spring-boot-starter0.2.0org.springframework.bootspring-boot-starter-testtestorg.springframework.bootspring-boot-maven-plugin
package demo.spring.boot.dubbo.provider.service;
import com.alibaba.dubbo.config.annotation.Service;
import demo.spring.boot.dubbo.api.GreetingService;
import java.time.LocalDateTime;
@Service(version = "${spring.application.version}",
application = "${dubbo.application.id}",
protocol = "${dubbo.protocol.id}",
registry = "${dubbo.registry.id}")
public class GreetingServiceImpl implements GreetingService {
@Override
public String welcome(String name) {
String msg = "Welcome " + name + " at " + LocalDateTime.now();
System.out.println(msg);
return msg;
}
}
2.4 不需要修改自动生成的应用启动类
package demo.spring.boot.dubbo.provider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoSpringBootDubboProviderApplication {
public static void main(String[] args) {
SpringApplication.run(DemoSpringBootDubboProviderApplication.class, args);
}
}
启动应用,日志如下,从 MulticastRegistry 相关日志信息中可以看见服务已注册成功。
C:\Dev\Java\jdk1.8.0_172\bin\java.exe "-javaagent:C:\Dev\JetBrains\IntelliJ IDEA 2018.1.2\lib\idea_rt.jar=50691:C:\Dev\JetBrains\IntelliJ IDEA 2018.1.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Dev\Java\jdk1.8.0_172\jre\lib\charsets.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\deploy.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\javaws.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jce.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jfr.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jfxswt.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jsse.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\management-agent.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\plugin.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\resources.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\rt.jar;D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-provider\target\classes;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\JYL\DEV\Maven\repo\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\JYL\DEV\Maven\repo\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\JYL\DEV\Maven\repo\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\JYL\DEV\Maven\repo\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\JYL\DEV\Maven\repo\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\JYL\DEV\Maven\repo\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;D:\JYL\DEV\Maven\repo\com\alibaba\dubbo\2.6.2\dubbo-2.6.2.jar;D:\JYL\DEV\Maven\repo\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\JYL\DEV\Maven\repo\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\JYL\DEV\Maven\repo\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;D:\JYL\DEV\Maven\repo\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\JYL\DEV\Maven\repo\jline\jline\0.9.94\jline-0.9.94.jar;D:\JYL\DEV\Maven\repo\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;D:\JYL\DEV\Maven\repo\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;D:\JYL\DEV\Maven\repo\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;D:\JYL\DEV\Maven\repo\com\google\guava\guava\16.0.1\guava-16.0.1.jar;D:\JYL\DEV\Maven\repo\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar;D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-api\target\classes demo.spring.boot.dubbo.provider.DemoSpringBootDubboProviderApplication
2018-08-02 20:03:38.348 INFO 7892 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
2018-08-02 20:03:38.353 INFO 7892 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo
:: Google group : [email protected]
2018-08-02 20:03:38.357 INFO 7892 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.id=demo-spring-boot-dubbo-provider, dubbo.application.name=demo-spring-boot-dubbo-provider, dubbo.protocol.id=dubbo, dubbo.protocol.name=dubbo, dubbo.protocol.port=20880, dubbo.registry.address=multicast://224.5.6.7:1234, dubbo.registry.id=demo-multicast-registry, dubbo.scan.basePackages=demo.spring.boot.dubbo.provider.service}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2018-08-02 20:03:38.440 INFO 7892 --- [ main] p.DemoSpringBootDubboProviderApplication : Starting DemoSpringBootDubboProviderApplication on LAPTOP-C375ASPB with PID 7892 (D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-provider\target\classes started by Ji in D:\JYL\DEV\IdeaProjects\demo)
2018-08-02 20:03:38.441 INFO 7892 --- [ main] p.DemoSpringBootDubboProviderApplication : No active profile set, falling back to default profiles: default
2018-08-02 20:03:38.495 INFO 7892 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3ec300f1: startup date [Thu Aug 02 20:03:38 CST 2018]; root of context hierarchy
2018-08-02 20:03:38.884 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : demo-spring-boot-dubbo-provider, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered.
2018-08-02 20:03:38.886 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : demo-spring-boot-dubbo-provider] has been registered.
2018-08-02 20:03:38.887 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : demo-multicast-registry, class : com.alibaba.dubbo.config.RegistryConfig] has been registered.
2018-08-02 20:03:38.887 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : demo-multicast-registry] has been registered.
2018-08-02 20:03:38.887 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : dubbo, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered.
2018-08-02 20:03:38.887 INFO 7892 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : dubbo] has been registered.
2018-08-02 20:03:38.971 INFO 7892 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator bean can't be found in BeanFactory with name [org.springframework.context.annotation.internalConfigurationBeanNameGenerator], dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:38.972 INFO 7892 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator will be a instance of org.springframework.context.annotation.AnnotationBeanNameGenerator , it maybe a potential problem on bean name generation., dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:38.990 WARN 7892 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] The BeanDefinition[Root bean: class [com.alibaba.dubbo.config.spring.ServiceBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] of ServiceBean has been registered with name : ServiceBean:greetingServiceImpl:demo.spring.boot.dubbo.api.GreetingService:${spring.application.version}, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:38.990 INFO 7892 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] 1 annotated Dubbo's @Service Components { [Bean definition with name 'greetingServiceImpl': Generic bean: class [demo.spring.boot.dubbo.provider.service.GreetingServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-provider\target\classes\demo\spring\boot\dubbo\provider\service\GreetingServiceImpl.class]] } were scanned under package[demo.spring.boot.dubbo.provider.service], dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:38.991 WARN 7892 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2018-08-02 20:03:39.191 INFO 7892 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:03:39.193 INFO 7892 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:03:39.194 INFO 7892 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:03:39.279 INFO 7892 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : demo-spring-boot-dubbo-provider] have been binding by prefix of configuration properties : dubbo.application
2018-08-02 20:03:39.318 INFO 7892 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : demo-multicast-registry] have been binding by prefix of configuration properties : dubbo.registry
2018-08-02 20:03:39.366 INFO 7892 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : dubbo] have been binding by prefix of configuration properties : dubbo.protocol
2018-08-02 20:03:39.887 INFO 7892 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-08-02 20:03:39.897 INFO 7892 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] The service ready on spring started. service: demo.spring.boot.dubbo.api.GreetingService, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.017 INFO 7892 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Export dubbo service demo.spring.boot.dubbo.api.GreetingService to local registry, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.017 INFO 7892 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Export dubbo service demo.spring.boot.dubbo.api.GreetingService to url dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&bind.ip=172.20.10.8&bind.port=20880&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.017 INFO 7892 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Register dubbo service demo.spring.boot.dubbo.api.GreetingService url dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&bind.ip=172.20.10.8&bind.port=20880&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 to registry registry://224.5.6.7:1234/com.alibaba.dubbo.registry.RegistryService?application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&pid=7892®istry=multicast×tamp=1533211419902, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.169 INFO 7892 --- [ main] c.a.d.remoting.transport.AbstractServer : [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /172.20.10.8:20880, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.185 INFO 7892 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Register: dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.186 INFO 7892 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Send broadcast message: register dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 to /224.5.6.7:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.186 INFO 7892 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Receive multicast message: register dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 from /172.20.10.8:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.188 INFO 7892 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Subscribe: provider://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&category=configurators&check=false&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.188 INFO 7892 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Send broadcast message: subscribe provider://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&category=configurators&check=false&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 to /224.5.6.7:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:40.189 INFO 7892 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Receive multicast message: subscribe provider://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&category=configurators&check=false&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 from /172.20.10.8:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:41.194 WARN 7892 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Ignore empty notify urls for subscribe url provider://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&category=configurators&check=false&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:03:41.205 INFO 7892 --- [ main] p.DemoSpringBootDubboProviderApplication : Started DemoSpringBootDubboProviderApplication in 3.141 seconds (JVM running for 3.758)
2018-08-02 20:03:41.213 INFO 7892 --- [pool-1-thread-1] .d.c.e.AwaitingNonWebApplicationListener : [Dubbo] Current Spring Boot Application is await...
3 demo-spring-boot-dubbo-consumer
3.1 POM 文件,注意添加 dubbo-spring-boot-starter 依赖
4.0.0demo.spring.boot.dubbodemo-spring-boot-dubbo-consumer0.0.1-SNAPSHOTjardemo-spring-boot-dubbo-consumerDemo project for Spring Bootorg.springframework.bootspring-boot-starter-parent2.0.4.RELEASEUTF-8UTF-81.8org.springframework.bootspring-boot-startercom.alibaba.bootdubbo-spring-boot-starter0.2.0org.springframework.bootspring-boot-starter-testtestorg.springframework.bootspring-boot-maven-plugin
C:\Dev\Java\jdk1.8.0_172\bin\java.exe "-javaagent:C:\Dev\JetBrains\IntelliJ IDEA 2018.1.2\lib\idea_rt.jar=51568:C:\Dev\JetBrains\IntelliJ IDEA 2018.1.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Dev\Java\jdk1.8.0_172\jre\lib\charsets.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\deploy.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\javaws.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jce.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jfr.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jfxswt.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\jsse.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\management-agent.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\plugin.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\resources.jar;C:\Dev\Java\jdk1.8.0_172\jre\lib\rt.jar;D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-consumer\target\classes;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;D:\JYL\DEV\Maven\repo\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\JYL\DEV\Maven\repo\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\JYL\DEV\Maven\repo\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\JYL\DEV\Maven\repo\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\JYL\DEV\Maven\repo\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\JYL\DEV\Maven\repo\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;D:\JYL\DEV\Maven\repo\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\JYL\DEV\Maven\repo\com\alibaba\boot\dubbo-spring-boot-starter\0.2.0\dubbo-spring-boot-starter-0.2.0.jar;D:\JYL\DEV\Maven\repo\com\alibaba\dubbo\2.6.2\dubbo-2.6.2.jar;D:\JYL\DEV\Maven\repo\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\JYL\DEV\Maven\repo\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\JYL\DEV\Maven\repo\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;D:\JYL\DEV\Maven\repo\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\JYL\DEV\Maven\repo\jline\jline\0.9.94\jline-0.9.94.jar;D:\JYL\DEV\Maven\repo\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;D:\JYL\DEV\Maven\repo\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;D:\JYL\DEV\Maven\repo\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;D:\JYL\DEV\Maven\repo\com\google\guava\guava\16.0.1\guava-16.0.1.jar;D:\JYL\DEV\Maven\repo\com\alibaba\boot\dubbo-spring-boot-autoconfigure\0.2.0\dubbo-spring-boot-autoconfigure-0.2.0.jar;D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-api\target\classes demo.spring.boot.dubbo.consumer.DemoSpringBootDubboConsumerApplication
2018-08-02 20:19:01.021 INFO 17432 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
2018-08-02 20:19:01.028 INFO 17432 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo
:: Google group : [email protected]
2018-08-02 20:19:01.030 INFO 17432 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.id=demo-spring-boot-dubbo-consumer, dubbo.application.name=demo-spring-boot-dubbo-consumer, dubbo.protocol.id=dubbo, dubbo.protocol.name=dubbo, dubbo.protocol.port=20880, dubbo.registry.address=multicast://224.5.6.7:1234, dubbo.registry.id=demo-multicast-registry}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2018-08-02 20:19:01.124 INFO 17432 --- [ main] c.DemoSpringBootDubboConsumerApplication : Starting DemoSpringBootDubboConsumerApplication on LAPTOP-C375ASPB with PID 17432 (D:\JYL\DEV\IdeaProjects\demo\demo-spring-boot-dubbo-consumer\target\classes started by Ji in D:\JYL\DEV\IdeaProjects\demo)
2018-08-02 20:19:01.125 INFO 17432 --- [ main] c.DemoSpringBootDubboConsumerApplication : No active profile set, falling back to default profiles: default
2018-08-02 20:19:01.190 INFO 17432 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5b0abc94: startup date [Thu Aug 02 20:19:01 CST 2018]; root of context hierarchy
2018-08-02 20:19:01.616 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : demo-spring-boot-dubbo-consumer, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered.
2018-08-02 20:19:01.616 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : demo-spring-boot-dubbo-consumer] has been registered.
2018-08-02 20:19:01.616 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : demo-multicast-registry, class : com.alibaba.dubbo.config.RegistryConfig] has been registered.
2018-08-02 20:19:01.616 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : demo-multicast-registry] has been registered.
2018-08-02 20:19:01.616 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : dubbo, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered.
2018-08-02 20:19:01.621 INFO 17432 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : dubbo] has been registered.
2018-08-02 20:19:01.862 INFO 17432 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' of type [com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$944554c6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:19:01.954 INFO 17432 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:19:01.958 INFO 17432 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:19:01.958 INFO 17432 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-02 20:19:02.376 INFO 17432 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : demo-spring-boot-dubbo-consumer] have been binding by prefix of configuration properties : dubbo.application
2018-08-02 20:19:02.386 INFO 17432 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : demo-multicast-registry] have been binding by prefix of configuration properties : dubbo.registry
2018-08-02 20:19:02.443 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Load registry store file C:\Users\Ji\.dubbo\dubbo-registry-demo-spring-boot-dubbo-consumer-224.5.6.7:1234.cache, data: {demo.spring.boot.dubbo.api.GreetingService:1.0=dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=10680&revision=1.0&side=provider×tamp=1533211117636&version=1.0}, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.474 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Register: consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=consumers&check=false&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.474 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Send broadcast message: register consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=consumers&check=false&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0 to /224.5.6.7:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.474 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Subscribe: consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.474 INFO 17432 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Receive multicast message: register consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=consumers&check=false&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0 from /172.20.10.8:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.475 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Send broadcast message: subscribe consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0 to /224.5.6.7:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.475 INFO 17432 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Receive multicast message: subscribe consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0 from /172.20.10.8:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.476 INFO 17432 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Receive multicast message: register dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0 from /172.20.10.8:1234, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.476 INFO 17432 --- [egistryReceiver] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Notify urls for subscribe url consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0, urls: [dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0], dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.818 INFO 17432 --- [egistryReceiver] c.a.d.remoting.transport.AbstractClient : [DUBBO] Successed connect to server /172.20.10.8:20880 from NettyClient 172.20.10.8 using dubbo version 2.6.2, channel is NettyChannel [channel=[id: 0x01d8a8f3, /172.20.10.8:51573 => /172.20.10.8:20880]], dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.819 INFO 17432 --- [egistryReceiver] c.a.d.remoting.transport.AbstractClient : [DUBBO] Start NettyClient LAPTOP-C375ASPB/172.20.10.8 connect to the server /172.20.10.8:20880, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.871 INFO 17432 --- [ main] c.a.d.r.multicast.MulticastRegistry : [DUBBO] Notify urls for subscribe url consumer://172.20.10.8/demo.spring.boot.dubbo.api.GreetingService?application=demo-spring-boot-dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.2&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432&revision=1.0&side=consumer×tamp=1533212342396&version=1.0, urls: [dubbo://172.20.10.8:20880/demo.spring.boot.dubbo.api.GreetingService?anyhost=true&application=demo-spring-boot-dubbo-provider&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=7892&revision=1.0&side=provider×tamp=1533211419902&version=1.0], dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.878 INFO 17432 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Refer dubbo service demo.spring.boot.dubbo.api.GreetingService from url multicast://224.5.6.7:1234/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=demo-spring-boot-dubbo-consumer&check=false&dubbo=2.6.2&generic=false&interface=demo.spring.boot.dubbo.api.GreetingService&methods=welcome&pid=17432®ister.ip=172.20.10.8&remote.timestamp=1533211419902&revision=1.0&side=consumer×tamp=1533212342396&version=1.0, dubbo version: 2.6.2, current host: 172.20.10.8
2018-08-02 20:19:02.886 INFO 17432 --- [ main] c.a.d.c.s.b.f.a.ReferenceBeanBuilder : has been built.
2018-08-02 20:19:02.921 INFO 17432 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : dubbo] have been binding by prefix of configuration properties : dubbo.protocol
2018-08-02 20:19:03.108 INFO 17432 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-08-02 20:19:03.123 INFO 17432 --- [ main] s.a.ScheduledAnnotationBeanPostProcessor : No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
2018-08-02 20:19:03.134 INFO 17432 --- [ main] c.DemoSpringBootDubboConsumerApplication : Started DemoSpringBootDubboConsumerApplication in 2.446 seconds (JVM running for 3.146)
2018-08-02 20:19:03.139 INFO 17432 --- [pool-1-thread-1] .d.c.e.AwaitingNonWebApplicationListener : [Dubbo] Current Spring Boot Application is await...
Welcome Dubbo at 2018-08-02T20:19:03.234
Welcome Dubbo at 2018-08-02T20:19:06.149
Welcome Dubbo at 2018-08-02T20:19:09.137
Welcome Dubbo at 2018-08-02T20:19:12.136
Welcome Dubbo at 2018-08-02T20:19:15.140
Welcome Dubbo at 2018-08-02T20:19:18.132
Welcome Dubbo at 2018-08-02T20:19:21.137
Welcome Dubbo at 2018-08-02T20:19:24.136
......
冒泡排序
public static void sort(Integer[] param) {
for (int i = param.length - 1; i > 0; i--) {
for (int j = 0; j < i; j++) {
int current = param[j];
int next = param[j + 1];
方法一:
public class Zhidao {
public static void main(String args[]) {
String s = "sdf灭礌 kjl d{';\fdsjlk是";
int n=0;
for(int i=0; i<s.length(); i++) {
n = (int)s.charAt(i);
if((
IF OBJECT_ID('tempdb..#ABC') is not null
drop table tempdb..#ABC
create table #ABC
(
PATHNAME NVARCHAR(50)
)
insert into #ABC
SELECT N'/ABCDEFGHI'
UNION ALL SELECT N'/ABCDGAFGASASSDFA'
UNION ALL
http://www.sdn.sap.com/irj/boc/business-objects-for-sap-faq
Besides, I care that how to integrate tightly.
By the way, for BW consultants, please just focus on Query Designer which i
结构
继承关系
public static final class Manifest.permission_group extends Object
java.lang.Object
android. Manifest.permission_group 常量
ACCOUNTS 直接通过统计管理器访问管理的统计
COST_MONEY可以用来让用户花钱但不需要通过与他们直接牵涉的权限
D