package com.example.bot.spring.textsender;

import java.util.*;

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

//import java.util.GregorianCalendar;
//import java.util.List;
//import java.util.Set;
//import java.util.concurrent.TimeUnit;
import com.example.bot.spring.database.*;
import com.linecorp.bot.client.LineMessagingClient;
import com.linecorp.bot.client.LineMessagingClientImpl;
import com.linecorp.bot.model.PushMessage;
import com.linecorp.bot.model.message.Message;
import com.linecorp.bot.model.message.TextMessage;

public class UQAnswerReplier implements Broadcaster{
	
	@Autowired
	LineMessagingClientImpl lineMessagingClient;

	public UQAnswerReplier() {
		// TODO Auto-generated constructor stub
		lineMessagingClient = new LineMessagingClientImpl();
	}

	@Override
	public void broadcast() throws Exception {
		System.out.println("You are here in the UQAnswerReplier");
		UQDBEngine searchEngine = new UQDBEngine();
		ArrayList<String> reply=searchEngine.answer();
		for(int i=0; i<reply.size(); i++) {
			String userID;
			String question;
			String answer;
			String[] temp = reply.get(i).split(",");
			userID=temp[0];
			question=temp[1];
			answer=temp[2];
			Message message = new TextMessage("For your question "+question+", the answer is "+answer);
			lineMessagingClient.pushMessage(new PushMessage(userID, message));
		}
	}
}

@@ -600,20 +600,8 @@
 %7B%0A%09%0A
-%09@Autowired%0A
 %09Lin
@@ -616,20 +616,16 @@
 ngClient
-Impl
  lineMes

Test again