Skip to main content

v5.1.0 (2026-09-08)

<dependency>
<groupId>net.hasor</groupId>
<artifactId>hasor-core</artifactId>
<version>5.1.0</version>
</dependency>

This version improves diagnostics during Bean creation, Web root-path mapping and static resource access, and module ownership of startup extensions.

Scope

  • Core Bean creation and primary source registration, Web routes, static resources, and Servlet lifecycle

Changes

  • Added
    • Add CircularDependencyException to report the dependency chain when Bean creation encounters a cycle, covering creation by type, constructor, and custom object provider.
    • Support URL prefixes and welcome files in ResourceFilter to map designated access paths to resource directories.
    • Allow RuntimeListener to create AppContext through a factory function stored in ServletContext, enabling integration with external startup workflows.
  • Improved
    • Recognize the installed-module marker when registering primary sources, avoiding repeated creation and binding of already registered modules.
    • Move embedded HTTP container APIs out of the Web kernel to separate request processing from container startup.
  • Fixed
    • Fix route format validation rejecting the root path /.
    • Use application-relative request paths for static resource lookup, avoiding treating the context path as a resource path when deployed under a non-root contextPath.
    • Check initialization state during Servlet context destruction to avoid further null-pointer exceptions after incomplete initialization.

Upgrade notes

  • Move WebServer, WebServers, WebServerConfig, and container SPI from net.hasor.web.http into the net.hasor.boot.web package of hasor-boot-web. Update dependencies and imports when using these types directly.
  • Core no longer assembles the original StartupModule and annotation AOP extension module by default. Applications depending on hasor.startup or the original net.hasor.core.exts.aop must adjust startup configuration or add the corresponding extension. Programmatic interceptor binding in Core remains available.
  • Circular dependencies now produce an explicit error and dependency chain. Correct the dependency relationships rather than relying on recursive object creation.
  • ResourceFilter(loader, urlPrefix) uses index.html as its default welcome file. Use the three-argument constructor for a different file; the original single-argument constructor remains available.