package sagan.questions.support;

import sagan.projects.support.ProjectMetadataService;

import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
class QuestionsController {

    private ProjectMetadataService service;

    @Autowired
    public QuestionsController(ProjectMetadataService service) {
        this.service = service;
    }

    @RequestMapping("/questions")
    public String show(Model model) {

        model.addAttribute("projects", service.getProjects().stream()
                .filter(project -> !project.getCategory().equals("attic"))
                .filter(project -> !project.getStackOverflowTagList().isEmpty())
                .sorted((p1, p2) -> p1.getName().compareToIgnoreCase(p2.getName()))
                .collect(Collectors.toList()));
        return "questions/index";
    }

}

package sagan.questions.support;

import sagan.projects.support.ProjectMetadataService;

import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
class QuestionsController {

    private final ProjectMetadataService projectMetadata;

    @Autowired
    public QuestionsController(ProjectMetadataService projectMetadata) {
        this.projectMetadata = projectMetadata;
    }

    @RequestMapping("/questions")
    public String show(Model model) {

        model.addAttribute("projects", projectMetadata.getProjects().stream()
                .filter(project -> !project.getCategory().equals("attic"))
                .filter(project -> !project.getStackOverflowTagList().isEmpty())
                .sorted((p1, p2) -> p1.getName().compareToIgnoreCase(p2.getName()))
                .collect(Collectors.toList()));
        return "questions/index";
    }

}

Rename ProjectMetadataService.{service => projectMetadata}