v1.0.0
Bring release v1.0.0
Core:
- Constructor Injection: Initialize dependencies through constructors.
- Setter Injection: Set dependencies through setter methods.
- Field Injection: Directly inject dependencies into fields.
- Collections Support: Ability to inject collections of dependencies.
- Prototype Bean: Define beans as prototype instances.
- Singleton Bean: Define beans as singleton instances.
- Configuration Support: Enhanced support for configuration settings.
Annotations:
- Component and Service: Annotation configurations for component and service classes.
- Autowired: Annotation for automatic dependency injection.
- Java Configuration with Bean and Configuration: Configuring beans using Java annotations.
Supported Annotations:
- Autowired
- Bean
- BeanProcessor
- Component
- Configuration
- Order
- PostConstruct
- PreDestroy
- Primary
- Qualifier
- ScheduledTask
- Scope
- Service
- Value
Exception Handling:
Various exceptions added to enhance error handling:
- BeanAnnotationMissingException
- BeanPostProcessorConstructionLimitationException
- BringGeneralException
- CyclicBeanException
- NoConstructorWithAutowiredAnnotationBeanException
- NoSuchBeanException
- NoUniqueBeanException
- PostConstructException
- PreDestroyException
- PropertyValueNotFoundException
Additional Features:
- Scheduling: Enhanced scheduling capabilities.
- Properties File Support: Improved support for properties files.
- Logging: Enhanced logging functionalities.
- Banner: Customizable banner support for application startup.
Web:
- Embedded Server: An integrated server within an application, enabling it to operate independently without an external server. Often lightweight and designed for specific frameworks or purposes.
- Dispatcher Servlet: The primary controller in Bring's MVC architecture for Java-based web applications. It manages incoming requests, directing them to appropriate resources (controllers, views, etc.) for processing.
- REST API: A set of rules for building web services that facilitate communication between different internet systems. Utilizes HTTP requests for CRUD operations on resources, typically returning JSON responses.
- Static Content Serving: Directly providing static files (e.g., HTML, CSS, JavaScript, images) to clients without server-side processing. Typically served as-is from the server's file system or a specified directory.
- Exception Handler: Specialized in intercepting and customizing error responses (in JSON format). Extends ErrorReportValve to manage exceptions within a Servlet container.
- Actuator: Offers endpoints to check application health, retrieve environment properties, Git information, and dynamically alter log levels.
Web Configuration Guide:
Random Port Generation: Supports generating a random port based on the key ${random.port} within a specified range (e.g., START_PORT_RANGE to END_PORT_RANGE). Useful for scenarios requiring unique, dynamically allocated ports at runtime.
ValuePropertiesPostProcessor: Enables dynamic profile configuration using VM parameters (e.g., -Dbring.profiles.active=dev). This resolves profile-specific properties, affecting loading of application-specific property files.
ServerProperties Class: Acts as a configuration container for web server settings, injected using the Value annotation. Centralizes and manages server configuration within the application.
Annotations:
- GetMapping
- Controller
- RestController
- PostMapping
- PutMapping
- PatchMapping
- DeleteMapping
- PathVariable
- RequestParam
- RequestBody
- RequestHeader
- ResponseStatus
Exception Scenarios:
- ConnectorStartFailedException
- WebServerException
- MethodArgumentTypeMismatchException
- MissingApplicationMappingException
- MissingBringServletImplException
- MissingRequestHeaderAnnotationValueException
- MissingRequestParamException
- RequestBodyTypeUnsupportedException
- RequestPathDuplicateException
- TypeArgumentUnsupportedException
For more details and examples, refer to the documentation