Class InsightsWebController
java.lang.Object
com.endurancetrio.app.insight.web.InsightsWebController
The
InsightsWebController handles Thymeleaf views for the Insights section.-
Constructor Summary
ConstructorsConstructorDescriptionInsightsWebController(MessageService messageService, AppProperties appProperties, InsightService insightService) -
Method Summary
Modifier and TypeMethodDescriptiongetInsightDetail(String language, String slug, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the article detail page for the given slug.getInsights(String language, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the insights listing page with paginated articles.
-
Constructor Details
-
InsightsWebController
@Autowired public InsightsWebController(MessageService messageService, AppProperties appProperties, InsightService insightService)
-
-
Method Details
-
getInsights
@GetMapping("/{language:en|pt}/insights") public String getInsights(@PathVariable String language, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the insights listing page with paginated articles.- Parameters:
language- the language path variable (enorpt)page- the page number from the query string (default0)request- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the insights view name
-
getInsightDetail
@GetMapping("/{language:en|pt}/insights/{slug}") public String getInsightDetail(@PathVariable String language, @PathVariable String slug, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the article detail page for the given slug.- Parameters:
language- the language path variable (enorpt)slug- the article URL slugrequest- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the insight detail view name
-