jetleaf 1.0.0 copy "jetleaf: ^1.0.0" to clipboard
jetleaf: ^1.0.0 copied to clipboard

A comprehensive, enterprise-grade Dart backend framework that brings Spring-like dependency injection, configuration management, and application lifecycle to Dart server-side development.

example/lib/main.dart

// ---------------------------------------------------------------------------
// 🍃 JetLeaf Framework - https://jetleaf.hapnium.com
//
// Copyright © 2025 Hapnium & JetLeaf Contributors. All rights reserved.
//
// This source file is part of the JetLeaf Framework and is protected
// under copyright law. You may not copy, modify, or distribute this file
// except in compliance with the JetLeaf license.
//
// For licensing terms, see the LICENSE file in the root of this project.
// ---------------------------------------------------------------------------
// 
// 🔧 Powered by Hapnium — the Dart backend engine 🍃

import 'package:jetleaf/jetleaf.dart';

void main(List<String> args) async {
  await JetApplication.run(ExampleApplication(), args);
}

@JetLeafApplication()
class ExampleApplication {
}

class ExampleAnnotationLifecycle {
  @OnApplicationStarting()
  void onStarting() {
    print("Application is starting...");
  }

  @OnApplicationStarting()
  void onStartingWithContext(Class<Object> mainClass) {
    print("Application is starting with main class: $mainClass...");
  }

  @OnApplicationStarting()
  void onStartingWithContextAndMainClass(ConfigurableBootstrapContext context, Class<Object> mainClass) {
    print("Application is starting with main class: $mainClass and context: $context...");
  }

  @OnApplicationStarted()
  void onStarted() {
    print("Application is started...");
  }

  @OnApplicationReady()
  void onReady() {
    print("Application is ready...");
  }

  @OnApplicationFailed()
  void onFailed() {
    print("Application failed to start...");
  }
}
2
likes
0
points
1.56k
downloads

Publisher

verified publisherjetleaf.hapnium.com

Weekly Downloads

A comprehensive, enterprise-grade Dart backend framework that brings Spring-like dependency injection, configuration management, and application lifecycle to Dart server-side development.

Homepage
Repository (GitHub)
View/report issues

Topics

#dart-backend #ioc #dependency-injection #configuration-management #application-framework

License

unknown (license)

Dependencies

jetleaf_convert, jetleaf_core, jetleaf_env, jetleaf_lang, jetleaf_logging, jetleaf_pod, jetleaf_utils, meta

More

Packages that depend on jetleaf