package com.darwinsys.springbootdemo;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * It's not a Servlet, it's a Controller
 */
@Controller()
public class NotAServlet {

	@RequestMapping(value="/notaservlet", method=RequestMethod.POST)
	public String doHardWork(@RequestParam("name") String name, ModelMap model) {
		System.out.println("NotAServlet.doHardWork()");
		model.addAttribute("greetings", String.format("<b>Hello %s!!</b>", name));
		return "hello";
	}
}

@@ -618,36 +618,29 @@
 %0D%0A%09%09
-model.addAttribute(%22
+final String 
 greeting
 s%22, 
@@ -639,11 +639,10 @@
 ting
-s%22,
+ =
  Str
@@ -678,16 +678,61 @@
 %22, name)
+;%0D%0A%09%09model.addAttribute(%22greetings%22, greeting
 );%0D%0A%09%09re

Extract "greeting" as a variable.