This commit is contained in:
Jonathan Cook
2019-10-23 15:01:44 +02:00
parent db85c8f275
commit 684ec0d2e3
20486 changed files with 1642483 additions and 0 deletions
@@ -0,0 +1,32 @@
package com.baeldung.rss;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.View;
/**
* REST Controller which returns an RSS Feed created by {@link RssFeedView}.
*
* @author Donato Rimenti
*
*/
@RestController
public class RssFeedController {
/**
* View used by this controller.
*/
@Autowired
private RssFeedView view;
/**
* Returns an RSS Feed created by {@link #view}.
*
* @return an RSS Feed
*/
@GetMapping("/rss")
public View getFeed() {
return view;
}
}