springBoot系列教程01:elasticsearch的集成及使用

2018-08-02 17:43:44 浏览数 (1)

 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

代码语言:javascript复制
    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
        </dependency>

3.定义操作对象

代码语言:javascript复制
package com.xiao.vo.elasticsearch;

import javax.validation.constraints.NotNull;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

@Document(indexName = "users", type = "userInfo")
public class UserInfo {
    @Id
    @NotNull
    private String id;

    @NotNull
    private String userName;

    @NotNull
    private String email;

    public String getId() {
        return id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setId(String id) {
        this.id = id;
    }

}

4.定义Repository可以理解为dao

代码语言:javascript复制
package com.xiao.mapper.elasticsearch;

import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Component;

import com.xiao.vo.elasticsearch.UserInfo;

@Component
public interface ESUserInfoRepository extends ElasticsearchRepository<UserInfo, String> {
    UserInfo findByUserName(String userName);
}

5.定义service

代码语言:javascript复制
package com.xiao.service.elasticsearch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xiao.mapper.elasticsearch.ESUserInfoRepository;
import com.xiao.vo.elasticsearch.UserInfo;

@Service
public class ESUserInfoService {

    @Autowired
    private ESUserInfoRepository eSUserInfoRepository;

    public UserInfo queryUserInfoById(String id) {
        return eSUserInfoRepository.findOne(id);
    }

    public UserInfo queryUserInfoByUserName(String userName) {
        return eSUserInfoRepository.findByUserName(userName);
    }

    public void save(UserInfo userInfo) {
        eSUserInfoRepository.save(userInfo);
    }
}

6.定义controller

代码语言:javascript复制
package com.xiao.web;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xiao.common.result.Result;
import com.xiao.service.elasticsearch.ESUserInfoService;
import com.xiao.vo.elasticsearch.UserInfo;

@RestController
public class ElasticSearchController {

    @Autowired
    private ESUserInfoService eSUserInfoService;

    @RequestMapping("/es/{id}")
    public Result queryAccountInfo(@PathVariable("id") String id) {
        UserInfo accountInfo = eSUserInfoService.queryUserInfoById(id);
        return new Result(accountInfo);
    }

    @RequestMapping("/es/query/{userName}")
    public Result queryAccountInfoByAccountName(@PathVariable("userName") String userName) {
        UserInfo userInfo = eSUserInfoService.queryUserInfoByUserName(userName);
        return new Result(userInfo);
    }

    @RequestMapping("/es/save")
    public Result save(@Valid UserInfo accountInfo) {
        eSUserInfoService.save(accountInfo);
        return new Result("保存成功");
    }
}

7.增加配置

代码语言:javascript复制
spring.data.elasticsearch.cluster-name=es-cluster
spring.data.elasticsearch.cluster-nodes=192.168.0.45:9300,192.168.0.45:9301
spring.data.elasticsearch.local=false
spring.data.elasticsearch.repositories.enable=true

8.启动项目确保无错误

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

代码语言:javascript复制
12:58:19.970 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
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/]
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/]
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
2017-12-14 12:58:21.180  INFO 12440 --- [  restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
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)
2017-12-14 12:58:21.813  INFO 12440 --- [  restartedMain] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2017-12-14 12:58:21.923  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2017-12-14 12:58:22.450  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-12-14 12:58:22.451  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-12-14 12:58:22.574  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-12-14 12:58:22.574  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-12-14 12:58:22.867  INFO 12440 --- [  restartedMain] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application is null : false
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2017-12-14 12:58:22.974  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2017-12-14 12:58:23.173  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : The response status is 200
2017-12-14 12:58:23.179  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Not registering with Eureka server per configuration
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

  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-12-14 12:58:23.572  INFO 12440 --- [  restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://USER-20171103FK:9947/
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
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']]]
2017-12-14 12:58:23.864  INFO 12440 --- [  restartedMain] com.xiao.SpringBootClient01Application   : No active profile set, falling back to default profiles: default
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
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.
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!
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:eclipseworkspacenewspring-cloud-examplespring-boot-client01targetclassescomxiaomapperelasticsearchESUserInfoRepository.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]
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!
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.
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!
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.
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]
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]
2017-12-14 12:58:26.267  INFO 12440 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=118acb2d-9b9a-3d5c-b498-891afaaff220
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.
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.
2017-12-14 12:58:26.311  INFO 12440 --- [  restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
2017-12-14 12:58:32.886  INFO 12440 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
2017-12-14 12:58:33.572  INFO 12440 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 9931 (http)
2017-12-14 12:58:33.585  INFO 12440 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-12-14 12:58:33.586  INFO 12440 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-12-14 12:58:33.750  INFO 12440 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-12-14 12:58:33.751  INFO 12440 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 9870 ms
2017-12-14 12:58:34.141  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-12-14 12:58:34.143  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'statViewServlet' to [/druid/*]
2017-12-14 12:58:34.149  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricsFilter' to: [/*]
2017-12-14 12:58:34.149  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webStatFilter' to urls: [/*]
2017-12-14 12:58:34.150  INFO 12440 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-12-14 12:58:34.577  INFO 12440 --- [  restartedMain] org.elasticsearch.plugins                : [Sinister] modules [], plugins [], sites []
2017-12-14 12:58:35.345  INFO 12440 --- [  restartedMain] o.s.d.e.c.TransportClientFactoryBean     : adding transport node : 192.168.0.45:9300
2017-12-14 12:58:35.402  INFO 12440 --- [  restartedMain] o.s.d.e.c.TransportClientFactoryBean     : adding transport node : 192.168.0.45:9301
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
2017-12-14 12:58:36.194  INFO 12440 --- [  restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-12-14 12:58:43.054  INFO 12440 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 
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
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)
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()
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)
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)
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)
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)
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)
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()
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)
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)
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)
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)
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()
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)
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)
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)
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)
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)
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)
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)
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
2017-12-14 12:58:43.745  INFO 12440 --- [  restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in globalExceptionHandler
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]
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}
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
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}
2017-12-14 12:58:45.422  INFO 12440 --- [  restartedMain] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService  'taskScheduler'
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.
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.
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()
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()
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()
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)
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()
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)
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()
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
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()
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)
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()
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()
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()
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()
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()
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()
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)
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>)
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()
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)
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)
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()
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()
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)
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()
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()
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>)
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()
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()
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)
2017-12-14 12:58:46.376  INFO 12440 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
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
2017-12-14 12:58:46.623  WARN 12440 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
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.
2017-12-14 12:58:46.632  WARN 12440 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
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.
2017-12-14 12:58:46.660  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2017-12-14 12:58:46.675  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient
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
2017-12-14 12:58:46.906  INFO 12440 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
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
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
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
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
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
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
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
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
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
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
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
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
2017-12-14 12:58:47.031  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering beans for JMX exposure on startup
2017-12-14 12:58:47.031  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel springCloudBusOutput
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]
2017-12-14 12:58:47.066  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel nullChannel
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]
2017-12-14 12:58:47.073  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel springCloudBusInput
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]
2017-12-14 12:58:47.085  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel errorChannel
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]
2017-12-14 12:58:47.107  INFO 12440 --- [  restartedMain] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageHandler errorLogger
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]
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).
2017-12-14 12:58:47.429  INFO 12440 --- [  restartedMain] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase -2147482648
2017-12-14 12:58:47.681  INFO 12440 --- [  restartedMain] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://USER-20171103FK:9947/
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
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']]]
2017-12-14 12:58:47.976  INFO 12440 --- [  restartedMain] com.xiao.SpringBootClient01Application   : No active profile set, falling back to default profiles: default
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
2017-12-14 12:58:48.035  INFO 12440 --- [  restartedMain] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
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
2017-12-14 12:58:48.173  INFO 12440 --- [  restartedMain] com.xiao.SpringBootClient01Application   : Started SpringBootClient01Application in 0.719 seconds (JVM running for 29.037)
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]
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).
2017-12-14 12:58:48.319  INFO 12440 --- [  restartedMain] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2017-12-14 12:58:48.323  INFO 12440 --- [  restartedMain] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2017-12-14 12:58:48.334  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2017-12-14 12:58:48.337  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-12-14 12:58:48.337  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-12-14 12:58:48.337  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-12-14 12:58:48.337  INFO 12440 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-12-14 12:58:48.388  INFO 12440 --- [  restartedMain] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application is null : false
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2017-12-14 12:58:48.389  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2017-12-14 12:58:48.395  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : The response status is 200
2017-12-14 12:58:48.397  INFO 12440 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2017-12-14 12:58:48.399  INFO 12440 --- [  restartedMain] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
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
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
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]
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...
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
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).
2017-12-14 12:58:48.486  INFO 12440 --- [  restartedMain] o.s.i.endpoint.EventDrivenConsumer       : started _org.springframework.integration.errorLogger
2017-12-14 12:58:48.486  INFO 12440 --- [  restartedMain] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147482647
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
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
2017-12-14 12:58:48.545  INFO 12440 --- [  restartedMain] o.s.i.a.i.AmqpInboundChannelAdapter      : started inbound.springCloudBus.anonymous.1NBLtAHNQu2p_gBmth-49w
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
2017-12-14 12:58:48.546  INFO 12440 --- [  restartedMain] o.s.i.endpoint.EventDrivenConsumer       : started inbound.springCloudBus.default
2017-12-14 12:58:48.546  INFO 12440 --- [  restartedMain] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147483647
2017-12-14 12:58:48.645  INFO 12440 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9931 (http)
2017-12-14 12:58:48.646  INFO 12440 --- [  restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 9931
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.发送保存请求 

代码语言:javascript复制
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

0 人点赞