This project is main of being as line bot message server, has echo and saving function, and get all messages function.
It will send welcome message to the user.
哈囉,歡迎加入好友。
可以使用'查詢訊息'關鍵字查詢已送出的訊息。
Using @EventMapping
maps TextMessage Event. If user types any words excepts "查詢訊息", then service will keep text and return same message to the user.
Returns all user sent messages and shows.
- Should change
channel-token
andchannel-secret
inapplication.yml
, you can copy from Line Developers console.line.bot: channel-token: <your channel token> channel-secret: <your channel secret> handler: path: /callback enabled: true
- Change database connection uri in
application.yml
. If you have login account and password, both should be set, too.spring: data: mongodb: uri: mongodb://localhost:27017/<your db name> authentication-database: admin