Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is my Code if necessary: HelloRestApiApplication.java package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @SpringBootApplication public class HelloRestApiApplication { public static void

image text in transcribedimage text in transcribed

Here is my Code if necessary:

HelloRestApiApplication.java

package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @SpringBootApplication public class HelloRestApiApplication { public static void main(String[] args) { SpringApplication.run(HelloRestApiApplication.class, args); } } 

Greeting.java

package com.example.demo; public class Greeting { private final long id; private final String content; public Greeting() { this.id = 0; this.content = ""; } public Greeting(long id, String content) { this.id = id; this.content = content; } public long getId() {return id;} public String getContent() {return content;} } 

HelloController.java

package com.example.demo; import org.springframework.web.bind.annotation.*; @RestController public class HelloController {

CODE FROM THE TOP (@RequestMapping...)

}

Part 1) Implement the following: createGreeting() method that accepts a string parameter and uses POST method Simply create a Greeting instance and return it

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions