Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.api.services; import com.api.domain.Greeting; import org.springframework.stereotype.Component; /** * * @author mark */ @Component public class ServiceImpl2 implements Service { private Greeting greeting = new Greeting(1, "impl2"); @Override public Greeting greet() { return greeting; } @Override public void setGreeting(Greeting greeting) { this.greeting = greeting; } }