Announcement Announcement Module
No announcement yet.
Using RestTemplate to get Redmine Data. Help is needed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using RestTemplate to get Redmine Data. Help is needed


    I am very new to Spring Tool Suit and I got nearly zero experience in JDBC or Rest API itself.
    As part of my training on this, my task is know to make it possible to get Redmine Data via RestAPI.

    And this is my Problem, I am very very new to this kind of operation and feels alone in the woods. So Many informations but none who hits my problem strait enough to help me. (And yes you think right it is my first contact with redmine too).

    But from the Beginning.

    My idea was I connect to the Application using the RestTemplate Funktion to connect to the server an "save" the Json Data in a Bufferedreader. The next step should be to handle this to Jackson an save the created POJOs into a javalist for future use.

    My first big problem is know that I am feels to stupid to connect the Server. Redmine shows some sample code for Java but i am unable to transfer this to Spring (and using Spring onboard options). The Sample code looks like this:

    import java.util.List;
    import com.taskadapter.redmineapi.RedmineManager;
    import com.taskadapter.redmineapi.bean.Issue;
    public class Simple {
        private static String redmineHost = "";
        private static String apiAccessKey = "a3221bfcef5750219bd0a2df69519416dba17fc9";
        private static String projectKey = "taskconnector-test";
        private static Integer queryId = null; // any
        public static void main(String[] args) {
            RedmineManager mgr = new RedmineManager(redmineHost, apiAccessKey);
            try {
            } catch (Exception e) {
        private static void tryGetIssues(RedmineManager mgr) throws Exception {
            List<Issue> issues = mgr.getIssues(projectKey, queryId);
            for (Issue issue : issues) {

    I am very confused at the moment and need some advice to get a solution for my problem.

    at the moment I stuck at:
             String redmineHost = "";
             String apiAccessKey = "a3221bfcef5750219bd0a2df69519416dba17fc9";
             String projectKey = "taskconnector-test";
             Integer queryId = null; // any
             RestTemplate rt = new RestTemplate();
             BufferedReader redmineBufferedReader = new BufferedReader(rt.getForEntity(redmineHost, JSON, apiAccessKey));
    And getting an error on restTemplate appears: "RestTemplate cannot be resolved to a type" but I take the import:

    import org.springframework.web.client;
    maybe this was wrong, but i doesn't see the wood at the moment there are so many threes.

    I was very thankful for any help.