Developer 역할 Spring 골격 smoke (role-developer-live-1522-001)

This commit is contained in:
forge-bot 2026-07-14 06:26:34 +00:00
parent 310e6d2433
commit 6040d126dd

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);
}
}