I've been studying the two spring boot books I know of: Spring Boot in Action by Walls and Learning Spring Boot by Turnquist and (I just discovered) Spring Boot Recipies by Antonov.
None of these books discuss the development of a groovy REST service using spring boot. So lets assume I'm starting with the minimum from https://spring.io/guides/gs/spring-boot/:
class ThisWillActuallyRun {

    String home() {
        return "Hello World!"

How do I enhance this to do authentication (and eventually authorization)?
After reading the first two books (could find much discussion in the cookbook) I'm wondering if I just append this class to the end of the groovy source code file?
@EnableGlobalMethodSecurity(securedEnabled = true)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
  public void configureAuth(AuthenticationManagerBuilder auth) throws Exception {
  protected void configure(HttpSecurity http) throws Exception {
   .formLogin().loginPage("/login").failureUrl("/login?error=true"); // what does a REST controller do with a form?
(1) If so, suppose it is only a REST service and not an MVC web page server. What do I do about the login forms? Ignore them?
(2) Suppose it is a combination REST service (for AJAX maybe) and I want to serve a few MVC web pages too.
(2a) How do I enhance the above groovy RestController to serve some MVC pages? Is it possible to have single class that services REST endpoints and MVC templates or do I need a separate controller class (in the same groovy source code file?) to serve MVC pages?
(2b) Where (what directory), for example, would I put the login form? In the java example, the html goes into the src/main/resources/templates. Do I put the files in the same place for java as groovy? Who decides where the MVC templates are stored?
Thank you