1.首先安装elasticsearch 集群环境,参考 http://www.cnblogs.com/xiaochangwei/p/8033773.html

注意:由于我的代码采用的是springboot 1.5.3 RELEASE版本,请安装elasticsearch 2.0.0以上版本 https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix

2. pom中引入elasticsearch

  1.     <dependency>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  4. </dependency>

3.定义操作对象

  1. package com.xiao.vo.elasticsearch;
  2.  
  3. import javax.validation.constraints.NotNull;
  4.  
  5. import org.springframework.data.annotation.Id;
  6. import org.springframework.data.elasticsearch.annotations.Document;
  7.  
  8. @Document(indexName = "users", type = "userInfo")
  9. public class UserInfo {
  10. @Id
  11. @NotNull
  12. private String id;
  13.  
  14. @NotNull
  15. private String userName;
  16.  
  17. @NotNull
  18. private String email;
  19.  
  20. public String getId() {
  21. return id;
  22. }
  23.  
  24. public String getUserName() {
  25. return userName;
  26. }
  27.  
  28. public void setUserName(String userName) {
  29. this.userName = userName;
  30. }
  31.  
  32. public String getEmail() {
  33. return email;
  34. }
  35.  
  36. public void setEmail(String email) {
  37. this.email = email;
  38. }
  39.  
  40. public void setId(String id) {
  41. this.id = id;
  42. }
  43.  
  44. }

4.定义Repository可以理解为dao

  1. package com.xiao.mapper.elasticsearch;
  2.  
  3. import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
  4. import org.springframework.stereotype.Component;
  5.  
  6. import com.xiao.vo.elasticsearch.UserInfo;
  7.  
  8. @Component
  9. public interface ESUserInfoRepository extends ElasticsearchRepository<UserInfo, String> {
  10. UserInfo findByUserName(String userName);
  11. }

5.定义service

  1. package com.xiao.service.elasticsearch;
  2.  
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.stereotype.Service;
  5.  
  6. import com.xiao.mapper.elasticsearch.ESUserInfoRepository;
  7. import com.xiao.vo.elasticsearch.UserInfo;
  8.  
  9. @Service
  10. public class ESUserInfoService {
  11.  
  12. @Autowired
  13. private ESUserInfoRepository eSUserInfoRepository;
  14.  
  15. public UserInfo queryUserInfoById(String id) {
  16. return eSUserInfoRepository.findOne(id);
  17. }
  18.  
  19. public UserInfo queryUserInfoByUserName(String userName) {
  20. return eSUserInfoRepository.findByUserName(userName);
  21. }
  22.  
  23. public void save(UserInfo userInfo) {
  24. eSUserInfoRepository.save(userInfo);
  25. }
  26. }

6.定义controller

  1. package com.xiao.web;
  2.  
  3. import javax.validation.Valid;
  4.  
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9.  
  10. import com.xiao.common.result.Result;
  11. import com.xiao.service.elasticsearch.ESUserInfoService;
  12. import com.xiao.vo.elasticsearch.UserInfo;
  13.  
  14. @RestController
  15. public class ElasticSearchController {
  16.  
  17. @Autowired
  18. private ESUserInfoService eSUserInfoService;
  19.  
  20. @RequestMapping("/es/{id}")
  21. public Result queryAccountInfo(@PathVariable("id") String id) {
  22. UserInfo accountInfo = eSUserInfoService.queryUserInfoById(id);
  23. return new Result(accountInfo);
  24. }
  25.  
  26. @RequestMapping("/es/query/{userName}")
  27. public Result queryAccountInfoByAccountName(@PathVariable("userName") String userName) {
  28. UserInfo userInfo = eSUserInfoService.queryUserInfoByUserName(userName);
  29. return new Result(userInfo);
  30. }
  31.  
  32. @RequestMapping("/es/save")
  33. public Result save(@Valid UserInfo accountInfo) {
  34. eSUserInfoService.save(accountInfo);
  35. return new Result("保存成功");
  36. }
  37. }

7.增加配置

  1. spring.data.elasticsearch.cluster-name=es-cluster
  2. spring.data.elasticsearch.cluster-nodes=192.168.0.45:9300,192.168.0.45:9301
  3. spring.data.elasticsearch.local=false
  4. spring.data.elasticsearch.repositories.enable=true

8.启动项目确保无错误

下列我我的启动日志,由于是springcloud相关项目,有很多加载项目

  1. 12:58:19.970 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
  2. 12:58:19.973 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
  3. 12:58:19.974 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/D:/eclipseworkspacenew/spring-cloud-example/spring-boot-client01/target/classes/, file:/D:/eclipseworkspacenew/spring-cloud-example/common/target/classes/]
  4. 2017-12-14 12:58:20.660 INFO 12440 --- [ restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2957257: startup date [Thu Dec 14 12:58:20 CST 2017]; root of context hierarchy
  5. 2017-12-14 12:58:21.180 INFO 12440 --- [ restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  6. 2017-12-14 12:58:21.244 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6b76858f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  7. 2017-12-14 12:58:21.813 INFO 12440 --- [ restartedMain] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
  8. 2017-12-14 12:58:21.923 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
  9. 2017-12-14 12:58:22.450 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
  10. 2017-12-14 12:58:22.451 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
  11. 2017-12-14 12:58:22.574 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
  12. 2017-12-14 12:58:22.574 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
  13. 2017-12-14 12:58:22.867 INFO 12440 --- [ restartedMain] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
  14. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Disable delta property : false
  15. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
  16. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
  17. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Application is null : false
  18. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
  19. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Application version is -1: true
  20. 2017-12-14 12:58:22.974 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
  21. 2017-12-14 12:58:23.173 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : The response status is 200
  22. 2017-12-14 12:58:23.179 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Not registering with Eureka server per configuration
  23. 2017-12-14 12:58:23.184 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1513227503184 with initial instances count: 5
  24.  
  25. . ____ _ __ _ _
  26. /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
  27. ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
  28. \\/ ___)| |_)| | | | | || (_| | ) ) ) )
  29. ' |____| .__|_| |_|_| |_\__, | / / / /
  30. =========|_|==============|___/=/_/_/_/
  31. :: Spring Boot :: (v1.5.3.RELEASE)
  32.  
  33. 2017-12-14 12:58:23.572 INFO 12440 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://USER-20171103FK:9947/
  34. 2017-12-14 12:58:23.819 INFO 12440 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config, profiles=[dev], label=dev01, version=null, state=null
  35. 2017-12-14 12:58:23.819 INFO 12440 --- [ restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='file:D:/eclipseworkspacenew/spring-cloud-example/config-repo/config-dev.properties']]]
  36. 2017-12-14 12:58:23.864 INFO 12440 --- [ restartedMain] com.xiao.SpringBootClient01Application : No active profile set, falling back to default profiles: default
  37. 2017-12-14 12:58:23.881 INFO 12440 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1cf20433: startup date [Thu Dec 14 12:58:23 CST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2957257
  38. 2017-12-14 12:58:25.396 INFO 12440 --- [ restartedMain] o.s.i.config.IntegrationRegistrar : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
  39. 2017-12-14 12:58:25.510 INFO 12440 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
  40. 2017-12-14 12:58:25.562 INFO 12440 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'ESUserInfoRepository' with a different definition: replacing [Generic bean: class [org.mybatis.spring.mapper.MapperFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireMode=2; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [D:\eclipseworkspacenew\spring-cloud-example\spring-boot-client01\target\classes\com\xiao\mapper\elasticsearch\ESUserInfoRepository.class]] with [Root bean: class [org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  41. 2017-12-14 12:58:25.575 INFO 12440 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
  42. 2017-12-14 12:58:25.601 INFO 12440 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data MongoDB - Could not safely identify store assignment for repository candidate interface com.xiao.mapper.elasticsearch.ESUserInfoRepository.
  43. 2017-12-14 12:58:25.618 INFO 12440 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
  44. 2017-12-14 12:58:25.650 INFO 12440 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.xiao.mapper.elasticsearch.ESUserInfoRepository.
  45. 2017-12-14 12:58:25.924 INFO 12440 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'redisTemplate' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration$RedisConfiguration; factoryMethodName=redisTemplate; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration$RedisConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=scopedTarget.redisClusterConfig; factoryMethodName=redisTemplate; initMethodName=null; destroyMethodName=(inferred); defined in com.xiao.config.RedisClusterConfig]
  46. 2017-12-14 12:58:25.925 INFO 12440 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'cacheManager' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.cache.RedisCacheConfiguration; factoryMethodName=cacheManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/cache/RedisCacheConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=scopedTarget.redisClusterConfig; factoryMethodName=cacheManager; initMethodName=null; destroyMethodName=(inferred); defined in com.xiao.config.RedisClusterConfig]
  47. 2017-12-14 12:58:26.267 INFO 12440 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=118acb2d-9b9a-3d5c-b498-891afaaff220
  48. 2017-12-14 12:58:26.291 INFO 12440 --- [ restartedMain] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
  49. 2017-12-14 12:58:26.295 INFO 12440 --- [ restartedMain] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
  50. 2017-12-14 12:58:26.311 INFO 12440 --- [ restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  51. 2017-12-14 12:58:26.373 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$15c840c0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  52. 2017-12-14 12:58:26.490 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration' of type [org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration$$EnhancerBySpringCGLIB$$818928d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  53. 2017-12-14 12:58:26.526 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'druidDataSource' of type [org.springframework.aop.scope.ScopedProxyFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  54. 2017-12-14 12:58:26.538 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$986eb8b0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  55. 2017-12-14 12:58:26.561 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$8ce27d54] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  56. 2017-12-14 12:58:26.582 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration' of type [org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration$$EnhancerBySpringCGLIB$$4f98da87] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  57. 2017-12-14 12:58:26.596 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'spelConverter' of type [org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration$SpelConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  58. 2017-12-14 12:58:26.604 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  59. 2017-12-14 12:58:26.617 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'scopedTarget.redisClusterConfig' of type [com.xiao.config.RedisClusterConfig$$EnhancerBySpringCGLIB$$3bc20282] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  60. 2017-12-14 12:58:26.675 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'redisClusterConfiguration' of type [org.springframework.aop.scope.ScopedProxyFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  61. 2017-12-14 12:58:26.678 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'redisClusterConfiguration' of type [org.springframework.data.redis.connection.RedisClusterConfiguration$$EnhancerBySpringCGLIB$$d8e4d79a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  62. 2017-12-14 12:58:26.689 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'scopedTarget.redisClusterConfiguration' of type [org.springframework.data.redis.connection.RedisClusterConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  63. 2017-12-14 12:58:32.886 INFO 12440 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService
  64. 2017-12-14 12:58:32.886 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'jedisConnectionFactory' of type [org.springframework.data.redis.connection.jedis.JedisConnectionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  65. 2017-12-14 12:58:32.899 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'redisTemplate' of type [org.springframework.data.redis.core.RedisTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  66. 2017-12-14 12:58:32.908 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'cacheManager' of type [org.springframework.data.redis.cache.RedisCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  67. 2017-12-14 12:58:32.909 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'cacheAutoConfigurationValidator' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  68. 2017-12-14 12:58:32.931 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'druidDataSource' of type [com.sun.proxy.$Proxy123] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  69. 2017-12-14 12:58:32.941 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$315025f2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  70. 2017-12-14 12:58:32.971 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  71. 2017-12-14 12:58:32.985 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'druidDataSource' of type [com.sun.proxy.$Proxy123] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  72. 2017-12-14 12:58:32.989 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'dataSourceInitializer' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  73. 2017-12-14 12:58:32.991 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'sessionFactoryConfig' of type [com.xiao.config.SessionFactoryConfig$$EnhancerBySpringCGLIB$$91400b77] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  74. 2017-12-14 12:58:33.006 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'annotationDrivenTransactionManager' of type [org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  75. 2017-12-14 12:58:33.008 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4f5c8292] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  76. 2017-12-14 12:58:33.087 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  77. 2017-12-14 12:58:33.088 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  78. 2017-12-14 12:58:33.116 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6b76858f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  79. 2017-12-14 12:58:33.135 INFO 12440 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.stream.config.BindingServiceConfiguration$PostProcessorConfiguration' of type [org.springframework.cloud.stream.config.BindingServiceConfiguration$PostProcessorConfiguration$$EnhancerBySpringCGLIB$$11242097] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  80. 2017-12-14 12:58:33.572 INFO 12440 --- [ restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 9931 (http)
  81. 2017-12-14 12:58:33.585 INFO 12440 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service Tomcat
  82. 2017-12-14 12:58:33.586 INFO 12440 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.14
  83. 2017-12-14 12:58:33.750 INFO 12440 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
  84. 2017-12-14 12:58:33.751 INFO 12440 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 9870 ms
  85. 2017-12-14 12:58:34.141 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
  86. 2017-12-14 12:58:34.143 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'statViewServlet' to [/druid/*]
  87. 2017-12-14 12:58:34.149 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
  88. 2017-12-14 12:58:34.149 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
  89. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
  90. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
  91. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
  92. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
  93. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webStatFilter' to urls: [/*]
  94. 2017-12-14 12:58:34.150 INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
  95. 2017-12-14 12:58:34.577 INFO 12440 --- [ restartedMain] org.elasticsearch.plugins : [Sinister] modules [], plugins [], sites []
  96. 2017-12-14 12:58:35.345 INFO 12440 --- [ restartedMain] o.s.d.e.c.TransportClientFactoryBean : adding transport node : 192.168.0.45:9300
  97. 2017-12-14 12:58:35.402 INFO 12440 --- [ restartedMain] o.s.d.e.c.TransportClientFactoryBean : adding transport node : 192.168.0.45:9301
  98. 2017-12-14 12:58:36.172 INFO 12440 --- [ restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@79178f35: startup date [Thu Dec 14 12:58:36 CST 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1cf20433
  99. 2017-12-14 12:58:36.194 INFO 12440 --- [ restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  100. 2017-12-14 12:58:43.054 INFO 12440 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService
  101. 2017-12-14 12:58:43.543 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1cf20433: startup date [Thu Dec 14 12:58:23 CST 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2957257
  102. 2017-12-14 12:58:43.652 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/hello01],methods=[POST]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.index(java.lang.String,java.lang.String)
  103. 2017-12-14 12:58:43.653 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.test()
  104. 2017-12-14 12:58:43.654 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/hello01_02],methods=[POST]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.index02(com.xiao.common.SearchParam,java.lang.String)
  105. 2017-12-14 12:58:43.654 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/hello01_03],methods=[POST]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.index03(com.xiao.common.SearchParam)
  106. 2017-12-14 12:58:43.654 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rpc/userLogin]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.userLogin(java.lang.String,java.lang.String)
  107. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rpc/userCheck]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.userCheck(java.lang.String,java.lang.String)
  108. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rpc/permissionCheck]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.permissionCheck(java.lang.String,java.lang.String)
  109. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dao/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.daoTest()
  110. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/json/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.jsonTest(com.xiao.domain.User)
  111. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/redis/setget]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.redisSetGet(java.lang.String)
  112. 2017-12-14 12:58:43.655 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/dbcache/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.cacheTest(java.lang.String)
  113. 2017-12-14 12:58:43.656 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/transaction/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.transactionTest(com.xiao.domain.Photo)
  114. 2017-12-14 12:58:43.656 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.apiTest()
  115. 2017-12-14 12:58:43.656 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/mongo/test]}" onto public com.xiao.common.result.Result com.xiao.web.APIController.mongoTest(com.xiao.domain.Photo)
  116. 2017-12-14 12:58:43.658 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/save]}" onto public com.xiao.common.result.Result com.xiao.web.ElasticSearchController.save(com.xiao.vo.elasticsearch.UserInfo)
  117. 2017-12-14 12:58:43.659 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/{id}]}" onto public com.xiao.common.result.Result com.xiao.web.ElasticSearchController.queryAccountInfo(java.lang.String)
  118. 2017-12-14 12:58:43.659 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/query/{userName}]}" onto public com.xiao.common.result.Result com.xiao.web.ElasticSearchController.queryAccountInfoByAccountName(java.lang.String)
  119. 2017-12-14 12:58:43.659 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello01]}" onto public com.xiao.common.result.Result com.xiao.web.RPCController.index(java.lang.String)
  120. 2017-12-14 12:58:43.659 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello01_02],methods=[POST]}" onto public com.xiao.common.result.Result com.xiao.web.RPCController.index02(com.xiao.common.SearchParam)
  121. 2017-12-14 12:58:43.659 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello01_03],methods=[POST]}" onto public com.xiao.common.result.Result com.xiao.web.RPCController.index03(com.xiao.common.SearchParam)
  122. 2017-12-14 12:58:43.660 INFO 12440 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public com.xiao.common.result.Result com.xiao.exception.GlobalExceptionHandler.defaultErrorHandler(javax.servlet.http.HttpServletRequest,java.lang.Exception) throws java.lang.Exception
  123. 2017-12-14 12:58:43.745 INFO 12440 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in globalExceptionHandler
  124. 2017-12-14 12:58:43.808 INFO 12440 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
  125. 2017-12-14 12:58:44.744 INFO 12440 --- [ restartedMain] org.mongodb.driver.cluster : Cluster created with settings {hosts=[192.168.0.45:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
  126. 2017-12-14 12:58:44.814 INFO 12440 --- [.168.0.45:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:1, serverValue:9}] to 192.168.0.45:27017
  127. 2017-12-14 12:58:44.816 INFO 12440 --- [.168.0.45:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=192.168.0.45:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 6]}, minWireVersion=0, maxWireVersion=3, maxDocumentSize=16777216, roundTripTimeNanos=807292}
  128. 2017-12-14 12:58:45.422 INFO 12440 --- [ restartedMain] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
  129. 2017-12-14 12:58:45.522 INFO 12440 --- [ restartedMain] o.s.aop.framework.CglibAopProxy : Final method [private final void com.alibaba.druid.pool.DruidDataSource.decrementPoolingCount()] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance.
  130. 2017-12-14 12:58:45.523 INFO 12440 --- [ restartedMain] o.s.aop.framework.CglibAopProxy : Final method [private final void com.alibaba.druid.pool.DruidDataSource.incrementPoolingCount()] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance.
  131. 2017-12-14 12:58:46.068 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  132. 2017-12-14 12:58:46.068 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/features || /features.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  133. 2017-12-14 12:58:46.068 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  134. 2017-12-14 12:58:46.069 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
  135. 2017-12-14 12:58:46.069 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  136. 2017-12-14 12:58:46.070 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/auditevents || /auditevents.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.boot.actuate.endpoint.mvc.AuditEventsMvcEndpoint.findByPrincipalAndAfterAndType(java.lang.String,java.util.Date,java.lang.String)
  137. 2017-12-14 12:58:46.070 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  138. 2017-12-14 12:58:46.070 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
  139. 2017-12-14 12:58:46.072 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  140. 2017-12-14 12:58:46.072 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/bus/refresh],methods=[POST]}" onto public void org.springframework.cloud.bus.endpoint.RefreshBusEndpoint.refresh(java.lang.String)
  141. 2017-12-14 12:58:46.074 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/archaius || /archaius.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  142. 2017-12-14 12:58:46.075 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/channels || /channels.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  143. 2017-12-14 12:58:46.075 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/restart || /restart.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
  144. 2017-12-14 12:58:46.075 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
  145. 2017-12-14 12:58:46.076 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/pause || /pause.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
  146. 2017-12-14 12:58:46.076 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  147. 2017-12-14 12:58:46.077 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.get(java.lang.String)
  148. 2017-12-14 12:58:46.078 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v1+json || application/json],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.set(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
  149. 2017-12-14 12:58:46.078 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers || /loggers.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  150. 2017-12-14 12:58:46.078 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/bus/env],methods=[POST]}" onto public void org.springframework.cloud.bus.endpoint.EnvironmentBusEndpoint.env(java.util.Map<java.lang.String, java.lang.String>,java.lang.String)
  151. 2017-12-14 12:58:46.079 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
  152. 2017-12-14 12:58:46.079 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  153. 2017-12-14 12:58:46.079 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/service-registry/instance-status],methods=[GET]}" onto public org.springframework.http.ResponseEntity org.springframework.cloud.client.serviceregistry.endpoint.ServiceRegistryEndpoint.getStatus()
  154. 2017-12-14 12:58:46.079 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/service-registry/instance-status],methods=[POST]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.cloud.client.serviceregistry.endpoint.ServiceRegistryEndpoint.setStatus(java.lang.String)
  155. 2017-12-14 12:58:46.079 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  156. 2017-12-14 12:58:46.080 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  157. 2017-12-14 12:58:46.081 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
  158. 2017-12-14 12:58:46.082 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
  159. 2017-12-14 12:58:46.082 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/resume || /resume.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
  160. 2017-12-14 12:58:46.082 INFO 12440 --- [ restartedMain] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
  161. 2017-12-14 12:58:46.376 INFO 12440 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
  162. 2017-12-14 12:58:46.384 WARN 12440 --- [ restartedMain] arterDeprecationWarningAutoConfiguration : spring-boot-starter-redis is deprecated as of Spring Boot 1.4, please migrate to spring-boot-starter-data-redis
  163. 2017-12-14 12:58:46.623 WARN 12440 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
  164. 2017-12-14 12:58:46.623 INFO 12440 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
  165. 2017-12-14 12:58:46.632 WARN 12440 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
  166. 2017-12-14 12:58:46.633 INFO 12440 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
  167. 2017-12-14 12:58:46.660 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
  168. 2017-12-14 12:58:46.675 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
  169. 2017-12-14 12:58:46.755 INFO 12440 --- [ restartedMain] o.s.i.codec.kryo.CompositeKryoRegistrar : configured Kryo registration [40, java.io.File] with serializer org.springframework.integration.codec.kryo.FileSerializer
  170. 2017-12-14 12:58:46.906 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
  171. 2017-12-14 12:58:46.907 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
  172. 2017-12-14 12:58:46.915 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
  173. 2017-12-14 12:58:46.917 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'rabbitConnectionFactory' has been autodetected for JMX exposure
  174. 2017-12-14 12:58:46.918 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'integrationMbeanExporter' has been autodetected for JMX exposure
  175. 2017-12-14 12:58:46.924 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
  176. 2017-12-14 12:58:46.925 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
  177. 2017-12-14 12:58:46.925 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'restartEndpoint' has been autodetected for JMX exposure
  178. 2017-12-14 12:58:46.925 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentBusEndpoint' has been autodetected for JMX exposure
  179. 2017-12-14 12:58:46.926 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshBusEndpoint' has been autodetected for JMX exposure
  180. 2017-12-14 12:58:46.926 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'serviceRegistryEndpoint' has been autodetected for JMX exposure
  181. 2017-12-14 12:58:46.928 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
  182. 2017-12-14 12:58:46.931 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
  183. 2017-12-14 12:58:46.946 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentBusEndpoint': registering with JMX server as MBean [org.springframework.cloud.bus.endpoint:name=environmentBusEndpoint,type=EnvironmentBusEndpoint]
  184. 2017-12-14 12:58:46.954 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
  185. 2017-12-14 12:58:46.964 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'serviceRegistryEndpoint': registering with JMX server as MBean [org.springframework.cloud.client.serviceregistry.endpoint:name=serviceRegistryEndpoint,type=ServiceRegistryEndpoint]
  186. 2017-12-14 12:58:46.967 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshBusEndpoint': registering with JMX server as MBean [org.springframework.cloud.bus.endpoint:name=refreshBusEndpoint,type=RefreshBusEndpoint]
  187. 2017-12-14 12:58:46.969 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
  188. 2017-12-14 12:58:46.983 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'integrationMbeanExporter': registering with JMX server as MBean [org.springframework.integration.monitor:name=integrationMbeanExporter,type=IntegrationMBeanExporter]
  189. 2017-12-14 12:58:47.005 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1cf20433,type=ConfigurationPropertiesRebinder]
  190. 2017-12-14 12:58:47.010 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
  191. 2017-12-14 12:58:47.016 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'rabbitConnectionFactory': registering with JMX server as MBean [org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory]
  192. 2017-12-14 12:58:47.024 INFO 12440 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.endpoint:name=refreshEndpoint,type=RefreshEndpoint]
  193. 2017-12-14 12:58:47.031 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering beans for JMX exposure on startup
  194. 2017-12-14 12:58:47.031 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel springCloudBusOutput
  195. 2017-12-14 12:58:47.034 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=springCloudBusOutput': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=springCloudBusOutput]
  196. 2017-12-14 12:58:47.066 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel nullChannel
  197. 2017-12-14 12:58:47.068 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=nullChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=nullChannel]
  198. 2017-12-14 12:58:47.073 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel springCloudBusInput
  199. 2017-12-14 12:58:47.075 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=springCloudBusInput': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=springCloudBusInput]
  200. 2017-12-14 12:58:47.085 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel errorChannel
  201. 2017-12-14 12:58:47.088 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageChannel,name=errorChannel': registering with JMX server as MBean [org.springframework.integration:type=MessageChannel,name=errorChannel]
  202. 2017-12-14 12:58:47.107 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageHandler errorLogger
  203. 2017-12-14 12:58:47.109 INFO 12440 --- [ restartedMain] o.s.i.monitor.IntegrationMBeanExporter : Located managed bean 'org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal': registering with JMX server as MBean [org.springframework.integration:type=MessageHandler,name=errorLogger,bean=internal]
  204. 2017-12-14 12:58:47.426 INFO 12440 --- [ restartedMain] o.s.integration.channel.DirectChannel : Channel 'spring-boot-client01:9931.springCloudBusInput' has 1 subscriber(s).
  205. 2017-12-14 12:58:47.429 INFO 12440 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147482648
  206. 2017-12-14 12:58:47.681 INFO 12440 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://USER-20171103FK:9947/
  207. 2017-12-14 12:58:47.969 INFO 12440 --- [ restartedMain] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config, profiles=[dev], label=dev01, version=null, state=null
  208. 2017-12-14 12:58:47.970 INFO 12440 --- [ restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='file:D:/eclipseworkspacenew/spring-cloud-example/config-repo/config-dev.properties']]]
  209. 2017-12-14 12:58:47.976 INFO 12440 --- [ restartedMain] com.xiao.SpringBootClient01Application : No active profile set, falling back to default profiles: default
  210. 2017-12-14 12:58:47.980 INFO 12440 --- [ restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7c512d6e: startup date [Thu Dec 14 12:58:47 CST 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1cf20433
  211. 2017-12-14 12:58:48.035 INFO 12440 --- [ restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
  212. 2017-12-14 12:58:48.100 INFO 12440 --- [ restartedMain] o.s.c.support.GenericApplicationContext : Refreshing org.springframework.context.support.GenericApplicationContext@5751ef6a: startup date [Thu Dec 14 12:58:48 CST 2017]; root of context hierarchy
  213. 2017-12-14 12:58:48.173 INFO 12440 --- [ restartedMain] com.xiao.SpringBootClient01Application : Started SpringBootClient01Application in 0.719 seconds (JVM running for 29.037)
  214. 2017-12-14 12:58:48.279 INFO 12440 --- [ restartedMain] o.s.a.r.c.CachingConnectionFactory : Created new connection: SimpleConnection@577f9145 [delegate=amqp://admin@192.168.0.32:5672/, localPort= 65210]
  215. 2017-12-14 12:58:48.317 INFO 12440 --- [ restartedMain] o.s.integration.channel.DirectChannel : Channel 'spring-boot-client01:9931.springCloudBusOutput' has 1 subscriber(s).
  216. 2017-12-14 12:58:48.319 INFO 12440 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
  217. 2017-12-14 12:58:48.323 INFO 12440 --- [ restartedMain] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
  218. 2017-12-14 12:58:48.334 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
  219. 2017-12-14 12:58:48.337 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
  220. 2017-12-14 12:58:48.337 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
  221. 2017-12-14 12:58:48.337 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
  222. 2017-12-14 12:58:48.337 INFO 12440 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
  223. 2017-12-14 12:58:48.388 INFO 12440 --- [ restartedMain] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
  224. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Disable delta property : false
  225. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
  226. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
  227. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Application is null : false
  228. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
  229. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Application version is -1: true
  230. 2017-12-14 12:58:48.389 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
  231. 2017-12-14 12:58:48.395 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : The response status is 200
  232. 2017-12-14 12:58:48.397 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 30
  233. 2017-12-14 12:58:48.399 INFO 12440 --- [ restartedMain] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4
  234. 2017-12-14 12:58:48.402 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1513227528402 with initial instances count: 5
  235. 2017-12-14 12:58:48.426 INFO 12440 --- [ restartedMain] o.s.c.n.e.s.EurekaServiceRegistry : Registering application spring-boot-client01 with eureka with status UP
  236. 2017-12-14 12:58:48.426 INFO 12440 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1513227528426, current=UP, previous=STARTING]
  237. 2017-12-14 12:58:48.438 INFO 12440 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SPRING-BOOT-CLIENT01/USER-20171103FK:spring-boot-client01:9931: registering service...
  238. 2017-12-14 12:58:48.486 INFO 12440 --- [ restartedMain] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
  239. 2017-12-14 12:58:48.486 INFO 12440 --- [ restartedMain] o.s.i.channel.PublishSubscribeChannel : Channel 'spring-boot-client01:9931.errorChannel' has 1 subscriber(s).
  240. 2017-12-14 12:58:48.486 INFO 12440 --- [ restartedMain] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
  241. 2017-12-14 12:58:48.486 INFO 12440 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147482647
  242. 2017-12-14 12:58:48.495 INFO 12440 --- [ restartedMain] c.s.b.r.p.RabbitExchangeQueueProvisioner : declaring queue for inbound: springCloudBus.anonymous.1NBLtAHNQu2p_gBmth-49w, bound to: springCloudBus
  243. 2017-12-14 12:58:48.510 INFO 12440 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SPRING-BOOT-CLIENT01/USER-20171103FK:spring-boot-client01:9931 - registration status: 204
  244. 2017-12-14 12:58:48.545 INFO 12440 --- [ restartedMain] o.s.i.a.i.AmqpInboundChannelAdapter : started inbound.springCloudBus.anonymous.1NBLtAHNQu2p_gBmth-49w
  245. 2017-12-14 12:58:48.546 INFO 12440 --- [ restartedMain] o.s.i.endpoint.EventDrivenConsumer : Adding {message-handler:inbound.springCloudBus.default} as a subscriber to the 'bridge.springCloudBus' channel
  246. 2017-12-14 12:58:48.546 INFO 12440 --- [ restartedMain] o.s.i.endpoint.EventDrivenConsumer : started inbound.springCloudBus.default
  247. 2017-12-14 12:58:48.546 INFO 12440 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483647
  248. 2017-12-14 12:58:48.645 INFO 12440 --- [ restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9931 (http)
  249. 2017-12-14 12:58:48.646 INFO 12440 --- [ restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 9931
  250. 2017-12-14 12:58:48.650 INFO 12440 --- [ restartedMain] com.xiao.SpringBootClient01Application : Started SpringBootClient01Application in 28.644 seconds (JVM running for 29.514)

#########################################代码测试#########################################

1.发送保存请求

  1. http://user-20171103fk:9931/es/save?userName=肖昌伟&email=changw.xiao@qq.com&id=666

2.查看存储结果

3.发送请求http://user-20171103fk:9931/es/666 根据id获取值

4.发送请求http://user-20171103fk:9931/es/query/肖昌伟 根据userName获取值

以上为elasticsearch的简易使用  更多命令请参考 http://blog.csdn.net/tanfei113/article/details/51934037

springBoot系列教程01:elasticsearch的集成及使用的更多相关文章

  1. SpringBoot系列之Spring Data Jpa集成教程

    SpringBoot系列之Spring Data Jpa集成教程 Spring Data Jpa是属于Spring Data的一个子项目,Spring data项目是一款集成了很多数据操作的项目,其下 ...

  2. SpringBoot系列教程JPA之新增记录使用姿势

    SpringBoot系列教程JPA之新增记录使用姿势 上一篇文章介绍了如何快速的搭建一个JPA的项目环境,并给出了一个简单的演示demo,接下来我们开始业务教程,也就是我们常说的CURD,接下来进入第 ...

  3. springCloud系列教程01:Eureka 注册中心集群搭建

    springCloud系列教程包含如下内容: springCloud系列教程01:Eureka 注册中心集群搭建 springCloud系列教程02:ConfigServer 配置中心server搭建 ...

  4. springBoot系列教程07:异常捕获

    发生异常是很正常的事,异常种类也是千奇百怪,发生异常并不可怕,只要正确的处理,并正确的返回错误信息并无大碍,如果不进行捕获或者处理,分分钟服务器宕机是很正常的事 所以处理异常时,最基本的要求就是发生异 ...

  5. Java工程师之SpringBoot系列教程前言&目录

    前言 与时俱进是每一个程序员都应该有的意识,当一个Java程序员在当代步遍布的时候,你就行该想到我能多学点什么.可观的是后端的框架是稳定的,它们能够维持更久的时间在应用中,而不用担心技术的更新换代.但 ...

  6. SpringBoot系列教程起步

    本篇学习目标 Spring Boot是什么? 构建Spring Boot应用程序 三分钟开发SpringBoot应用程序 本章源码下载 Spring Boot是什么? spring Boot是由Piv ...

  7. SpringBoot系列教程web篇之过滤器Filter使用指南

    web三大组件之一Filter,可以说是很多小伙伴学习java web时最早接触的知识点了,然而学得早不代表就用得多.基本上,如果不是让你从0到1写一个web应用(或者说即便从0到1写一个web应用) ...

  8. SpringBoot系列教程web篇之自定义异常处理HandlerExceptionResolver

    关于Web应用的全局异常处理,上一篇介绍了ControllerAdvice结合@ExceptionHandler的方式来实现web应用的全局异常管理: 本篇博文则带来另外一种并不常见的使用方式,通过实 ...

  9. SpringBoot系列教程web篇之全局异常处理

    当我们的后端应用出现异常时,通常会将异常状况包装之后再返回给调用方或者前端,在实际的项目中,不可能对每一个地方都做好异常处理,再优雅的代码也可能抛出异常,那么在 Spring 项目中,可以怎样优雅的处 ...

随机推荐

  1. 【MySQL疑难杂症】如何将树形结构存储在数据库中(方案一、Adjacency List)

    今天来看看一个比较头疼的问题,如何在数据库中存储树形结构呢? 像mysql这样的关系型数据库,比较适合存储一些类似表格的扁平化数据,但是遇到像树形结构这样有深度的人,就很难驾驭了. 举个栗子:现在有一 ...

  2. Python3_打开和运行方式

    蹬蹬蹬--第一次写博客,如有错误欢迎指正. Python很火,前几天也是因为需要装了一下,但是并没有用它,今天打开准备刚准备试下,才发现自己对这个软件一无所知,百度了一些资料发现并不能用才知道pyth ...

  3. windows10 使用gitblit搭建git服务器

    今天在win10上使用gitblit搭建git服务器时被坑了下,因为安装的java9出现不兼容问题,果断卸载重装了jdk8.废话不多说直接进入正题吧: 第一章 前言 使用gitblit搭建git se ...

  4. 安卓开发之mqtt协议

    首先物联网协议mqtt协议是基于tcp/ip协议的,使用了官方的mqttclient框架/**初始化mqttclient*/private void init() { try { //MQTT的连接设 ...

  5. Android ListView与RecycleView的对比使用

    ListView,就如其名,是用来显示列表的一种View,而RecycleView,是其的加强版,今天带来的是这两个几乎具有相同的功能的对比使用 先从ListView说起吧 ListView: 1.在 ...

  6. 什么是BSD?

       BSD (Berkeley Software Distribution,伯克利软件套件)是Unix的衍生系统,1970年代由加州大学伯克利分校开创.BSD用来代表由此派生出的各种套件集合. BS ...

  7. Linux定义变量的脚本

    现有两段基本一样的代码,只是变量进行改变,其他都没有变化,但是执行过程中出现了不一样的结果 代码一: vi back.sh #backup import file,such as /etc/rc.lo ...

  8. python入门基础

    Python 入门 变量 什么是变量?变量就是变化的量,核心是"变"和"量"两个字,变就是变化,量就是衡量状态. 为什么需要变量?程序执行的本质就是一系列状态的 ...

  9. sed命令针对文件操作具体解释

    Linux的简单shell脚本中改动文件操作 1.Sed简单介绍 sed 是一种在线编辑器,它一次处理一行内容.处理时.把当前处理的行存储在暂时缓冲区中,称为"模式空间"(patt ...

  10. 通过案例学习 Secret - 每天5分钟玩转 Docker 容器技术(110)

    在下面的例子中,我们会部署一个 WordPress 应用,WordPress 是流行的开源博客系统. 我们将创建一个 MySQL service,将密码保存到 secret 中.我们还会创建一个 Wo ...