Developer 역할 Spring 골격 smoke #4

Merged
forge-bot merged 9 commits from forge/role-developer-live-1522-001-attempt-1-run-6a48084c658b into main 2026-07-14 06:33:09 +00:00
Showing only changes of commit 6040d126dd - Show all commits

View file

@ -0,0 +1,21 @@
package com.example.demo.service;
import org.springframework.stereotype.Service;
@Service
public class HelloService {
private static final String GREETING_TEMPLATE = "Hello, %s!";
private static final String DEFAULT_GREETING = "Hello, World!";
public String getGreeting() {
return DEFAULT_GREETING;
}
public String getGreetingFor(String name) {
if (name == null || name.isBlank()) {
return DEFAULT_GREETING;
}
return String.format(GREETING_TEMPLATE, name);
}
}