https://github.com/mzlnk/javalin-xt
Simple and very lightweight set of extension features dedicated to Javalin
https://github.com/mzlnk/javalin-xt
extension javalin kotlin library
Last synced: 6 months ago
JSON representation
Simple and very lightweight set of extension features dedicated to Javalin
- Host: GitHub
- URL: https://github.com/mzlnk/javalin-xt
- Owner: mzlnk
- License: apache-2.0
- Created: 2024-10-03T21:37:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T19:58:34.000Z (over 1 year ago)
- Last Synced: 2025-01-23T20:19:24.894Z (over 1 year ago)
- Topics: extension, javalin, kotlin, library
- Language: Kotlin
- Homepage: https://github.com/mzlnk/javalin-xt
- Size: 472 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# javalin-xt
[](https://shields.io/)
[](https://github.com/ellerbrock/open-source-badges/)
[](https://javalin.io/)
[](https://kotlinlang.org/)
[](https://www.java.com/)
[](https://gradle.org/)
[](https://central.sonatype.com/artifact/io.mzlnk/javalin-xt/overview)
[](#)
[](#)
## About 🌐
**javalin-xt** is a very lightweight set of extension features dedicated to [Javalin](https://javalin.io/).
### Key concepts
Key concepts of **javalin-xt** include:
#### ▶ Lightweight
Designed to be as lightweight as possible. It does not introduce any additional dependencies to your project. Just the
most basic and useful features that can enhance working with Javalin.
#### ▶ No reflection
No use of reflection in its features. Everything is done at compile time.
#### ▶ Not over-engineered
No heavy use of proxies, annotations, or other complex mechanisms under the hood. Everything is kept simple in order to
make
any potential debugging or troubleshooting easier.
#### ▶ Invisible
Can be considered as an extension to Javalin. Using it, you can still use Javalin as you would normally do, but with the
added benefit of javalin-xt features accessible via Javalin `app`.
#### ▶ Dedicated to Javalin
Specifically designed to work with Javalin which allows for a more streamlined and efficient integration.
### Key features
| Feature | Description |
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| **Dependency injection** | Simple and lightweight dependency injection (DI) framework that uses no reflection. |
| **Application properties** | Simple engine to read and access application properties in a Spring Boot-like way via application.yml stored in your resources. |
| **Declarative routing** | Simple way to define routes in a declarative way using minimized set of annotations and no reflection |
## Notes 📄
Currently, javalin-xt is still in development 🚧. Therefore:
- Kotlin support only (support for Java is planned in the future)
- Some features may have limited functionality
- Gradle support only
## Quickstart 🚀
### Installation 🔧
#### Gradle
```kotlin
plugins {
id("io.mzlnk:javalin-xt") version "1.0.0"
}
```
#### Maven
To be announced soon.
### Enabling javalin-xt 🔓
To enable javalin-xt, you just need to invoke dedicated method on `JavalinConfig` instance during Javalin creation. For
example:
```kotlin
fun main(args: Array) {
val app = Javalin.create { config ->
// enables IoC container and dependency injection
config.enableIoC()
// enables application properties engine
config.enableApplicationProperties { propertiesConfig ->
propertiesConfig.profile = "dev"
}
}
// registers declaratively defined endpoint
app.registerEndpoint(SampleEndpoint())
app.start(8080)
}
```
### Explore javalin-xt features 🎯
Now you can start exploring javalin-xt features. All the features are described in details in
the [Wiki](https://github.com/mzlnk/javalin-xt/wiki) section:
- [Dependency injection](https://github.com/mzlnk/javalin-xt/wiki/Dependency-injection)
- [Application properties](https://github.com/mzlnk/javalin-xt/wiki/Application-properties)
- [Declarative routing](https://github.com/mzlnk/javalin-xt/wiki/Declarative-routing)
## Examples 📂
There are example project using different build tools available in the `examples` directory.
## License 🎫
javalin-xt is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for more information.
## Contributing 💪
Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for more information.
## Authors ⚗️
javalin-xt is developed by:
- [Marcin Zielonka](https://github.com/mzlnk)