All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.USFW_Sample Maven / Gradle / Ivy

package ex;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Component
public class USFW_Sample {

    private String s;

    public void writeToField() {
        s = "Hello";
    }
}

@Controller
@Scope("singleton")
class USFW1_Sample {

    private String s;

    public void writeToField() {
        s = "Hello";
    }
}

@Repository
@Scope(scopeName = "singleton")
class USFW2_Sample {

    private String s;

    public void writeToField() {
        s = "Hello";
    }
}

@Service
@Scope("prototype")
class USFW3_Sample {

    private String s;

    public void fpWriteToField() {
        s = "Hello";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy