getApplicationName method

  1. @override
String getApplicationName()
override

Returns the name of this application.

The application name is typically derived from:

  • Explicit configuration via application.name property
  • Main application class name
  • Framework default naming
  • Deployment environment configuration

Usage:

final appName = context.getApplicationName();

// Use in logging
logger.info('Application $appName starting up');

// Use in monitoring
metrics.gauge('app.name', appName);

// Use in UI or API responses
return {
  'app': appName,
  'version': '1.0.0',
  'status': 'running'
};

Implementation

@override
String getApplicationName() {
  final name = getEnvironment().getProperty(JETLEAF_APPLICATION_NAME) ?? getEnvironment().getProperty(APPLICATION_NAME);
  return name ?? "JetLeafApplication";
}