Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
처음부터 제대로 배우는 스프링 부트
by
마크 헤클러
,
오시영
,
서정대
May 2023
Beginner to intermediate
384 pages
8h 42m
Korean
Hanbit Media, Inc.
Content preview from
처음부터 제대로 배우는 스프링 부트
58
처음부터 제대로 배우는 스프링 부트
@GetMapping("/coffees/{id}")
Optional<Coffee> getCoffeeById(@PathVariable String id) {
for (Coffee c: coffees) {
if (c.getId().equals(id)) {
return Optional.of(c);
}
}
return Optional.empty();
}
3.4.2
POST
로 생성하기
HTTP POST
메서드를 사용해 리소스를 생성합니다.
NOTE
_
POST
는 리소스의 세부 정보(일반적으로
JSON
형식)를 제공합니다. 해당 서비스에
POST
요청을
해서 지정된
URI
에 리소스를 생성합니다.
다음 코드에서 볼 수 있듯,
POST
는 비교적 간단히 구현할 수 있습니다. 스프링 부트의 자동 마
샬링 덕분에 해당 커피 정보를
Coffee
객체로 받습니다. 그리고 해당 객체를 커피 목록에 추가
합니다.
Coffee
객체는 스프링 부트에 의해 언마샬링
(
기본값은
JSON
)
되어 요청한 애플리케
이션이나 서비스로 반환됩니다.
@PostMapping("/coffees")
Coffee postCoffee(@RequestBody Coffee coffee) {
coffees.add(coffee);
return coffee;
}
3.4.3
PUT
으로 업데이트하기 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
프로그래머의 길 멘토에게 묻다
David Hoover, Adewale Oshineye, Kang Jung Bin
코드로 인프라 관리하기(2판)
키프 모리스
해커, 광기의 랩소디(복간판): 세상을 바꾼 컴퓨터 혁명의 영웅들
박재호, 이해영, 스티븐 레비
SRE를 위한 시스템 설계와 구축
헤더 애드킨스, 벳시 바이어, 폴 블랭킨십, 피오트르 레반도프스키, 애나 오프레아, 애덤 스터블필드
Publisher Resources
ISBN: 9791169210966