package com.juick.www.controllers; import com.juick.service.MessagesService; import com.juick.service.TagService; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import javax.inject.Inject; /** * Created by aalexeev on 11/21/16. */ @Controller public class TagController { @Inject private TagService tagService; @Inject private MessagesService messagesService; @RequestMapping("/tag/{tagName}") public String showTags( @PathVariable String tagName, @RequestParam(required = false, defaultValue = "0") int before, Model model) { return "index"; } @RequestMapping("/tag") public String redirectToMain() { return "redirect:/"; } }