Coder Social home page Coder Social logo

line / line-bot-sdk-java Goto Github PK

View Code? Open in Web Editor NEW
601.0 71.0 946.0 30.2 MB

LINE Messaging API SDK for Java

Home Page: https://developers.line.biz/en/docs/messaging-api/overview/

License: Apache License 2.0

Java 99.39% Python 0.61%
line bot sdk java spring kotlin

line-bot-sdk-java's Introduction

LINE Messaging API SDK for Java

Maven Central javadoc

Introduction

The LINE Messaging API SDK for Java makes it easy to develop bots using LINE Messaging API, and you can create a sample bot within minutes.

Documentation

See the official API documentation for more information.

Requirements

This library requires Java 17 or later.

Installation

We've uploaded this library to the Maven Central Repository. You can install the modules using Maven or Gradle.

https://central.sonatype.com/search?smo=true&q=com.linecorp.bot

Gradle (Kotlin) example

implementation("com.linecorp.bot:line-bot-messaging-api-client:<VERSION>")
implementation("com.linecorp.bot:line-bot-insight-client:<VERSION>")
implementation("com.linecorp.bot:line-bot-manage-audience-client:<VERSION>")
implementation("com.linecorp.bot:line-bot-module-attach-client:<VERSION>")
implementation("com.linecorp.bot:line-bot-module-client:<VERSION>")
implementation("com.linecorp.bot:line-bot-shop-client:<VERSION>")
implementation("com.linecorp.bot:line-channel-access-token-client:<VERSION>")
implementation("com.linecorp.bot:line-liff-client:<VERSION>")

implementation("com.linecorp.bot:line-bot-webhook:<VERSION>")
implementation("com.linecorp.bot:line-bot-parser:<VERSION>") // You don't need to depend on this explicitly.

implementation("com.linecorp.bot:line-bot-spring-boot-webmvc:<VERSION>")
implementation("com.linecorp.bot:line-bot-spring-boot-client:<VERSION>") // If you want to write spring-boot API client
implementation("com.linecorp.bot:line-bot-spring-boot-handler:<VERSION>") // You don't need to depend on this explicitly.
implementation("com.linecorp.bot:line-bot-spring-boot-web:<VERSION>") // You don't need to depend on this explicitly.

Sample code

This project contains the following sample projects:

Spring Boot integration

The line-bot-spring-boot module lets you build a bot application as a Spring Boot application.

package com.example.bot.spring.echo;

import java.util.List;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.linecorp.bot.messaging.client.MessagingApiClient;
import com.linecorp.bot.messaging.model.ReplyMessageRequest;
import com.linecorp.bot.messaging.model.TextMessage;
import com.linecorp.bot.spring.boot.handler.annotation.EventMapping;
import com.linecorp.bot.spring.boot.handler.annotation.LineMessageHandler;
import com.linecorp.bot.webhook.model.Event;
import com.linecorp.bot.webhook.model.MessageEvent;
import com.linecorp.bot.webhook.model.TextMessageContent;

@SpringBootApplication
@LineMessageHandler
public class EchoApplication {
    private final MessagingApiClient messagingApiClient;

    public static void main(String[] args) {
        SpringApplication.run(EchoApplication.class, args);
    }

    public EchoApplication(MessagingApiClient messagingApiClient) {
        this.messagingApiClient = messagingApiClient;
    }

    @EventMapping
    public void handleTextMessageEvent(MessageEvent<TextMessageContent> event) {
        System.out.println("event: " + event);
        final String originalMessageText = ((TextMessageContent) event.message()).text();
        messagingApiClient.replyMessage(
            new ReplyMessageRequest.Builder(event.replyToken(), List.of(new TextMessage(originalMessageText)))
                .build()
        );
    }

    @EventMapping
    public void handleDefaultMessageEvent(Event event) {
        System.out.println("event: " + event);
    }
}

How do I use a proxy server?

You can use a proxy with this module.

api = MessagingApiClient.builder("MY_OWN_TOKEN")
        .apiEndPoint(URI.create("https://api.line.me/"))
        .proxy(new Proxy(Proxy.Type.HTTP,
                new InetSocketAddress("proxy.example.com", 8080)
        ))
        .build();

Note: You don't need to use an add-on like Fixie to have static IP addresses for proxy servers. You can make API calls without entering IP addresses on the server IP whitelist.

How to get x-line-request-id header and error message

You may need to store the x-line-request-id header obtained as a response from several APIs. In this case, you can get it from Result<T>.

Result<Object> apiResponse = messagingApiClient
    .narrowcast(retryKey, new NarrowcastRequest.Builder(messages).build())
    .get();
System.out.println("x-line-request-id: " + apiResponse.requestId());

You can get error messages from MessagingApiClientException when you use MessagingApiClient. Each client defines its own exception class.

try {
    messagingApiClient.replyMessage(new ReplyMessage(replyToken, messages));
} catch (ExecutionException e) {
    if (e.getCause() instanceof MessagingApiClientException){
        MessagingApiClientException exception=(MessagingApiClientException)e.getCause();
        System.out.println("Error http status code: " + exception.getCode());
        System.out.println("Error response: " + exception.getDetails());
        System.out.println("Error message: " + exception.getMessage());
    }
}

When you need to get x-line-accepted-request-id header from error response, you can get it: exception.getHeader("x-line-accepted-request-id").

Help and media

FAQ: https://developers.line.biz/en/faq/

News: https://developers.line.biz/en/news/

Versioning

This project respects semantic versioning.

See http://semver.org/.

From version 7.x

LINE's SDK developer team decides to generate SDK code based on OpenAPI spec. As a result, LINE bot sdk 7.x is not compatible with 6.x. But it can follow the future API changes very quickly.

  • line-bot-model and line-bot-api-client are splitted to line-bot-webhook and clients/ modules
  • line-bot-servlet is no longer supported.
  • line-bot-cli is no longer supported.
  • line-bot-spring-boot was splitted.
    • Splitted to following modules.
      • line-bot-spring-boot-client is a client bean configuration module.
        • If you want to write spring-boot API client,
      • line-bot-spring-boot-handler is a handler configuration.
        • You don't need to depend this explicitly.
      • line-bot-spring-boot-web is a spring-web binding.
        • You don't need to depend this explicitly.
      • line-bot-spring-boot-webmvc is a spring-webmvc binding.
        • usually, you want to depend on this module.

Contributing

Please check CONTRIBUTING before making a contribution.

License

Copyright (C) 2016 LINE Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

line-bot-sdk-java's People

Contributors

be-hase avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar hamata5656 avatar imasahiro avatar intactio avatar iphayao avatar jiangying000 avatar kazuki-ma avatar kcvlex avatar krrrr38 avatar kumai avatar mrexmelle avatar okue avatar renovate[bot] avatar sjpark-dev avatar sugimura-shoji avatar sugyan avatar synk avatar tawash1 avatar tkgauri avatar tokuhirom avatar toru1055 avatar wouter-veeken avatar xfalcons avatar yang-33 avatar yohsuke avatar yuan51 avatar yukihane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

line-bot-sdk-java's Issues

pushMessage() doesn't work inside thenAccept()

I use Spring Boot. Using this code, the message arrives in target phone:

line.pushMessage(new PushMessage("target", new TextMessage("bla")))

This code does not work (message does not arrive, no error):

line.getMessageContent("valid-id").thenAccept(new Consumer<MessageContentResponse>() {
	void accept(MessageContentResponse response) {
		line.pushMessage(new PushMessage("target", new TextMessage("bla")))
	}
})

Am I missing something?

PushMessage always return 400 Bad Request

I am using Line official account for free plan. I have enabled message API and EchoApplication is working fine.
I am trying to use PushMessage api from LineMessagingService but I always get return 400 Bad Request with invalid property 'to', here is full detail.

: {"to":"xxxx","messages":[{"type":"text","text":"hello"}]}
: --> END POST (61-byte body)
: <-- 400 Bad Request https://api.line.me/v2/bot/message/push (209ms)
: Server: nginx
: Content-Type: application/json;charset=UTF-8
: X-Line-Request-Id: 22701bcd-d412-4515-a16e-ea3c20956532
: X-Content-Type-Options: nosniff
: X-XSS-Protection: 1; mode=block
: X-Frame-Options: DENY
: Content-Length: 85
: Expires: Sun, 06 Nov 2016 05:11:35 GMT
: Cache-Control: max-age=0, no-cache, no-store
: Pragma: no-cache
: Date: Sun, 06 Nov 2016 05:11:35 GMT
: Connection: close
: {"message":"The property, 'to', in the request body is invalid (line: -, column: -)"}

Note: for user id 'xxxx" I have tried to use my personal line id which got from LINE application and also this account already added my Line official account.

here is code section

private void pushTextMessage() {
System.out.println("push text message:");
Message textMessage = new TextMessage("hello");
PushMessage pushMessage = new PushMessage("xxxx", textMessage);
lineMessagingService.pushMessage(pushMessage);
try {
final BotApiResponse apiResponse = lineMessagingService.pushMessage(pushMessage).execute().body();
} catch (Exception e) {
System.out.println(e.getMessage());
}

So I am not sure that

  1. Did I supply the wrong userId? if so where/how should I get a userId to supply the property 'to'
  2. How/which api should I use for sending message to all users who have added my LINE official account as friend. Because push message api still require to supply only 1 userId/time.
    Documents also said that it can send to rooms or groups but how do I get those IDs? This is just like LINE@ manager which is able to compose a message then send to friends at once.

Whitelabel Error Page

I deployed the app to Heroku, provided the required details, but this shows up when I try to access the app:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Oct 10 09:40:17 UTC 2017
There was an unexpected error (type=Not Found, status=404).
No message available

Thanks for your help.

Many errors after import and open the project

Hi, I've cloned and imported your project in my Intellij and I want to try to build the springboot sample app using this Line SDK. but I got some errors like this pic below.
selection_090
I still wondering which part that makes error. I observe the CLASS that have VALUE annotation do not have getter method. So, could you help me to figure out this problem, please?
Thank you :)

Can I integrate line-bot-sdk-java without using spring-boot ?

I am running my server with play framework.

In Play, there is already a way to route a URL to a function call, and get the data in the post body.

All I need is convert the json file to objects in line-bot-model

and use the line-bot-api-client to communicate with the client

Can I use line java bot sdk without spring-boot ?

If yes, is there any tutorial on how to do this ?

Handle return value as reply message.

Replying the message from user is one of the most basic function.
So I hope that SDK supports replying message using method return value.

The following code is echo bot sample.

@SpringBootApplication
@LineMessageHandler
public class EchoApplication {
    // @Autowired
    // private LineMessagingService lineMessagingService;
    // Not needed!

    public static void main(String[] args) {
        SpringApplication.run(EchoApplication.class, args);
    }

    @EventMapping // ★0 : @EventMapping annotation currently Work-In-Progress
    public Message handleTextMessageEvent(MessageEvent<TextMessageContent> event) throws Exception {
        // ★1: Method's return type is Message.
        // supported type will be
        // * Message
        // * List<Message>
        // * CompletableFuture<Message> and CompletableFuture<List<Message>>

        return new TextMessage(event.getMessage().getText());
        // ★2: Returned Message will be deliver to original sender as reply by SDK! 
    }
}

Use Java8's CompletableFuture instead of Retrofit2's Call.

Current (as of v1.1.0) LineMessagingService.java is exposing its implementation detail (e.g. using Retrofit2).

  • LineMessagingService itself is interface for Retrofit2.
  • LineMessagingService's async interface is Retrofit2's Call.

To hiding implementation detail, wrap current implementation by another class and convert Retorfit2's Call into CompletableFuture.

Feature 1 and 3.1

LHS and me have added feature 1 and 3.1 . Please review the code.

Integrate to Spring Boot with Spring Security

Do you ever try to integrate this to Spring Boot which included Spring Security,

I try to do this got exception as below:

[2017-03-08 22:20:21.129][http-nio-8080-exec-1][ERROR][o.a.c.c.C.[.[.[.[dispatcherServlet]] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.ClassCastException: org.springframework.web.servlet.mvc.ParameterizableViewController cannot be cast to org.springframework.web.method.HandlerMethod] with root cause
java.lang.ClassCastException: org.springframework.web.servlet.mvc.ParameterizableViewController cannot be cast to org.springframework.web.method.HandlerMethod
	at com.linecorp.bot.spring.boot.interceptor.LineBotServerInterceptor.preHandle(LineBotServerInterceptor.java:49)
	at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:134)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:958)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)

RFC: Support Multi Bot Hosting. (minor?)

Currently, some bot parameter like channel-secret is global configuration and it is not a list.
We can't host multiple bot in same JVM/Spring's Application Context.

Authorisation process in web-view renders 'invalid replyToken'

The replyToken becomes invalid after 10 seconds. I am trying to implement 3rd party authorisation using Line Messaging API. I have created a bot named 'Active Banking' which opens up a web view for authorisation.
By the time user credentials are entered in the webview and the login button is clicked, the replyToken for the passed query expires and 'invalid reply token' gets logged in the console.
Is there a possibility to extend the expiry time of a replyToken in Line?

Maven/Gradle section on README.md

Since you have maven repository, it would be great if you have how-to section for importing libraries with Gradle/Maven into own project. Because this doc just forward to this github so I had to take a look into build.gradle to know group id and search it on mvnrepository.com.

Thank you

PushMessage: property 'to' is invalid

I tried to send a push message but I always get the following response:
{ "message": "The property, 'to', in the request body is invalid (line: -, column: -)" }

Where could I find the right ID of the receiver and what format should have it(String or Array)?
Or is it only available for a paid account and not an developer trial?

Step

Do this before creating an issue

  • Check the FAQ for LINE bots
  • Make sure your issue is related to the LINE Bot SDK. For general questions or issues about LINE bots, create an issue on the FAQ repository. Note that we don't provide technical support.

When creating an issue

  • Provide detailed information about the issue you had with the SDK
  • Provide logs if possible

LineBotCallbackRequestParser#handle is not valid if called from RestController

In the current implementation, where LineBotCallbackRequestParser#handle only accepts HttpServletRequest, LineBotCallbackRequestParser can only be used in an interceptor.

It throws LineBotCallbackException with message "Invalid API Signature" if called from a RestController as the interceptor may have been called before.
(See: http://stackoverflow.com/questions/5023718/how-to-retrieve-raw-post-data-from-httpservletrequest-in-java).

The exception happens because HttpServletRequest#getInputStream returns an empty string which renders the signature checking invalid.

It is better if the function can be used in a normal RestController without having to be in an interceptor.

Gradlew bootrun stucked on 78%

Gradlew bootrun stopped on 78%
I used this command based on the read me file

gradlew bootRun -Dline.bot.channelToken=MY_CHANNEL_TOKEN -Dline.bot.channelSecret=MY_CHANNEL_SECRET

I am running Windows 10
Please help me :'(

Testing on local machine

hello.
I am new to this kind of stuff.
I would like to ask about the testing.
Can I test it on local machine instead of pushing it to heroku?

Avoid warm message related JDK-5087240 on specific version JVM

We should remove the following logs.

2017-09-19 23:28:41.322  WARN 95792 --- [           main] .m.p.TypeAnnotationAwareMetaDataProvider : Constraints on the parameters of constructors of non-static inner classes are not supported if those parameters have a generic type due to JDK bug JDK-5087240.

java.lang.ArrayIndexOutOfBoundsException: 0
	at java.lang.reflect.Parameter.getAnnotatedType(Parameter.java:237) ~[na:1.8.0_25]
	at org.hibernate.validator.internal.metadata.provider.TypeAnnotationAwareMetaDataProvider.findTypeAnnotationConstraintsForExecutableParameter(TypeAnnotationAwareMetaDataProvider.java:85) ~[hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getParameterMetaData(AnnotationMetaDataProvider.java:498) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findExecutableMetaData(AnnotationMetaDataProvider.java:347) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getMetaData(AnnotationMetaDataProvider.java:332) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getConstructorMetaData(AnnotationMetaDataProvider.java:310) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.retrieveBeanConfiguration(AnnotationMetaDataProvider.java:139) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfiguration(AnnotationMetaDataProvider.java:125) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfigurationForHierarchy(AnnotationMetaDataProvider.java:108) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:203) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getOrCreateBeanMetaData(BeanMetaDataManager.java:231) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:178) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.buildNewLocalExecutionContext(ValidatorImpl.java:775) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:758) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:684) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:419) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:207) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:102) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.validation.DataBinder.validate(DataBinder.java:877) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:274) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:240) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:329) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:291) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1180) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1096) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:659) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at com.example.bot.spring.echo.EchoApplication.main(EchoApplication.java:33) [classes/:na]

2017-09-19 23:28:41.324  WARN 95792 --- [           main] .m.p.TypeAnnotationAwareMetaDataProvider : Constraints on the parameters of constructors of non-static inner classes are not supported if those parameters have a generic type due to JDK bug JDK-5087240.

java.lang.ArrayIndexOutOfBoundsException: 1
	at java.lang.reflect.Parameter.getAnnotatedType(Parameter.java:237) ~[na:1.8.0_25]
	at org.hibernate.validator.internal.metadata.provider.TypeAnnotationAwareMetaDataProvider.findTypeAnnotationConstraintsForExecutableParameter(TypeAnnotationAwareMetaDataProvider.java:85) ~[hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getParameterMetaData(AnnotationMetaDataProvider.java:498) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findExecutableMetaData(AnnotationMetaDataProvider.java:347) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getMetaData(AnnotationMetaDataProvider.java:332) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getConstructorMetaData(AnnotationMetaDataProvider.java:310) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.retrieveBeanConfiguration(AnnotationMetaDataProvider.java:139) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfiguration(AnnotationMetaDataProvider.java:125) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfigurationForHierarchy(AnnotationMetaDataProvider.java:108) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:203) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getOrCreateBeanMetaData(BeanMetaDataManager.java:231) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:178) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.buildNewLocalExecutionContext(ValidatorImpl.java:775) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:758) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:684) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:419) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:207) [hibernate-validator-5.3.5.Final.jar:5.3.5.Final]
	at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:102) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.validation.DataBinder.validate(DataBinder.java:877) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:274) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:240) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:329) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:291) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1316) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1282) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1180) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1096) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:659) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) [spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) [spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
	at com.example.bot.spring.echo.EchoApplication.main(EchoApplication.java:33) [classes/:na]

Replace LineMessagingService by LineMessagingClient. (Include docs, examples)

LineMessagingClient is interface that don't depends Retrofit2 implementation.
But LineMessagingService is depends Retrofit2 and okhttp3 such as

import okhttp3.ResponseBody;
import retrofit2.Call;

Call<ResponseBody> getMessageContent(@Path("messageId") String messageId)

Basically, Retrofit2 interface is difficult to use than CompletableFuture
Need migration from LineMessagingService to LineMessagingClient.

Support multicast API

LINE Messaging API supports multicast API. line-bot-sdk-java should support this API.

How to write my Test

I am following the kitchensink example and successfully build my application. I am wondering if it is possible to write a Unit test for my kitchensink on spring boot + gradle, i.e., mimicking a line client sending message to the bot and assert some replies.

Bot

Do this before creating an issue

  • Check the FAQ for LINE bots
  • Make sure your issue is related to the LINE Bot SDK. For general questions or issues about LINE bots, create an issue on the FAQ repository. Note that we don't provide technical support.

When creating an issue

  • Provide detailed information about the issue you had with the SDK
  • Provide logs if possible

LineMessagingClient.getProfile() does not work when MessageEvent.source is GroupSource

Hi,

I have a bot which is present in a group with several users. I noticed that when I receive a MessageEvent the source is either GroupSource (when the messages is sent in the group itself) or UserSource when the bot receives a private message.

Example of NON working profile retrieval sending a message in the group
event: MessageEvent(replyToken=xxxxx, source=GroupSource(groupId=zzzzz, userId=yyyyy), message=TextMessageContent(id=6412615796056, text=test), timestamp=2017-07-19T14:29:23.066Z)
LOG: https://pastebin.com/raw/1jCn327t

Example of working profile retrieval, sending a private message to the BOT
event: MessageEvent(replyToken=YYYYYYYYYYYYYYYYY, source=UserSource(userId=XXXXXXXXXXXX), message=TextMessageContent(id=6401892239567, text=test), timestamp=2017-07-17T12:52:22.607Z)
LOG: https://pastebin.com/raw/psEH54xx

In both cases I retrive the profile in the following way:

CompletableFuture<UserProfileResponse> userProfileFuture = lineMessagingClient.getProfile(event.getSource().getUserId());

UserProfileResponse userProfile = null;
try {
	userProfile = userProfileFuture.get();
	System.out.println("Got user profile: " + userProfile.getDisplayName() + " ("+ userProfile.getUserId() + ")");
} catch (Exception e) {
	System.err.println("Cannot retrieve profile for user: " + e.getMessage());
}

About the Event.getSource().getUserId() and mid retrieved from Line Login

Hi!

There seem to be two types of IDs for users on line's platform.

one is the userId in the messaging API, and another one is the mid received from Line login.

Why do you use different ID?

We are going to implement a LINE Bot, and we want to recognize the user (as someone on our website) when he adds our bot

So I tried to implement LINE login on our website. After the user login, his account will be saved in our user database (Now the LINE ID is mapped to a user on our website)

But I found that for the two APIs, the user's IDs are different.....

Is there any way that we can map the two different IDs?

Are there any api to let user add friend?

I has a plan to make a service to find line friend. So I want to have some API to get a userID from mid so I can construct a link line.me/ti/p/~userID
But login API only give displayname and mid. And I can't find any api to retrieve userID from mid or access token

Is it possible or are there any alternative solution?
Such as a link format like line.me/ti/m/~mid that would redirect user who click a link to line.me/ti/p/~userID

Or an api that would let user send message to target user from his access token, so they could add each other?

Nakagawachr

Do this before creating an issue

  • Check the FAQ for LINE bots
  • Make sure your issue is related to the LINE Bot SDK. For general questions or issues about LINE bots, create an issue on the FAQ repository. Note that we don't provide technical support.

When creating an issue

  • Provide detailed information about the issue you had with the SDK
  • Provide logs if possible

Where is the Message Class?

I Can't import Message Class at model.callback package.Where is it?

import com.linecorp.bot.model.callback.Message;

line-bot-spring-bootのREADMEに書かれているサンプルコードを書いてみたところ、Messageクラスが見つかりませんでした。

Get ID of user from group chat.

When receiving a message from a room, only the room ID is given as the source of the message. How do I look up the user ID of the sender?

Location

is there a way to let users send their location ?

<img src="http://qr-official.line.me/L/C-cNzypDjO.png">

Do this before creating an issue

  • Check the FAQ for LINE bots
  • Make sure your issue is related to the LINE Bot SDK. For general questions or issues about LINE bots, create an issue on the FAQ repository. Note that we don't provide technical support.

When creating an issue

  • Provide detailed information about the issue you had with the SDK
  • Provide logs if possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.