Annotation Interface Singleton


@Scope @Documented @Retention(RUNTIME) public @interface Singleton
Denotes that a bean should be created as a singleton instance.

Singleton-scoped beans are instantiated once and reused throughout the entire Maven execution. This scope should be used for stateless services or components that can be safely shared across the entire build process.

Example usage:

 @Singleton
 public class GlobalConfiguration {
     // Implementation
 }
 
Since:
4.0.0
See Also: