@@ -0,0 +1,1557 @@
+/*%0A   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A   This file is licensed under the Apache License, Version 2.0 (the %22License%22).%0A   You may not use this file except in compliance with the License. A copy of%0A   the License is located at%0A    http://aws.amazon.com/apache2.0/%0A   This file is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR%0A   CONDITIONS OF ANY KIND, either express or implied. See the License for the%0A   specific language governing permissions and limitations under the License.%0A*/%0A%0A%0Apackage com.example.handlingformsubmission;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.ui.Model;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.ModelAttribute;%0Aimport org.springframework.web.bind.annotation.PostMapping;%0A%0A@Controller%0Apublic class GreetingController %7B%0A%0A    @Autowired%0A    private DynamoDBEnhanced dde;%0A%0A    @Autowired%0A    private PublishTextSMS msg;%0A%0A%0A    @GetMapping(%22/greeting%22)%0A    public String greetingForm(Model model) %7B%0A        model.addAttribute(%22greeting%22, new Greeting());%0A        return %22greeting%22;%0A    %7D%0A%0A    @PostMapping(%22/greeting%22)%0A    public String greetingSubmit(@ModelAttribute Greeting greeting) %7B%0A%0A        //Persist submitted data into a DynamoDB table using the Enhanced Client%0A        dde.injectDynamoItem(greeting);%0A%0A        // Send a mobile notification%0A        msg.sendMessage(greeting.getId());%0A%0A        return %22result%22;%0A    %7D%0A%0A%7D%0A

Create GreetingController.java