Skip to content

Releases: BlyznytsiaOrg/bring

v2.0.0

19 Jan 20:34
Compare
Choose a tag to compare

Bring release v2.0.0

Update dependencies:

  1. core
org.slf4j » slf4j-api 2.0.9 2.0.11
org.assertj » assertj-core 3.24.2 3.25.1
org.junit.jupiter » junit-jupiter 5.9.2 5.10.1
org.mockito » mockito-core 5.7.0 5.9.0
  1. web
com.fasterxml.jackson.datatype » jackson-datatype-jsr310 2.15.3 2.16.1
org.apache.tomcat.embed » tomcat-embed-jasper 10.1.13 10.1.18
org.apache.tomcat.embed » tomcat-embed-core4 vulnerabilities 10.1.13 10.1.18
org.apache.tomcat.embed » tomcat-embed-el 10.1.13 10.1.18
org.apache.tomcat.embed » tomcat-embed-websocket 10.1.13 10.1.18
org.assertj » assertj-core 3.24.2 3.25.1
org.junit.jupiter » junit-jupiter 5.9.2 5.10.1

v1.0.0

09 Dec 12:57
Compare
Choose a tag to compare

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