Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dfuchss/tray-launcher-4-spring-boot
A simple tool to use a Tray Launcher for Spring Boot Applications
https://github.com/dfuchss/tray-launcher-4-spring-boot
incubator spring-boot tray-icon
Last synced: about 8 hours ago
JSON representation
A simple tool to use a Tray Launcher for Spring Boot Applications
- Host: GitHub
- URL: https://github.com/dfuchss/tray-launcher-4-spring-boot
- Owner: dfuchss
- License: mit
- Created: 2021-01-31T18:25:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T11:06:17.000Z (7 months ago)
- Last Synced: 2024-04-24T06:10:43.591Z (7 months ago)
- Topics: incubator, spring-boot, tray-icon
- Language: Java
- Homepage:
- Size: 143 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# tray-launcher-4-spring-boot
[![Maven Deploy](https://github.com/dfuchss/tray-launcher-4-spring-boot/actions/workflows/deploy.yml/badge.svg)](https://github.com/dfuchss/tray-launcher-4-spring-boot/actions/workflows/deploy.yml)
[![Latest Release](https://img.shields.io/github/release/dfuchss/tray-launcher-4-spring-boot.svg)](https://github.com/dfuchss/tray-launcher-4-spring-boot/releases/latest)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=dfuchss_tray-launcher-4-spring-boot&metric=alert_status)](https://sonarcloud.io/dashboard?id=dfuchss_tray-launcher-4-spring-boot)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=square)](https://github.com/dfuchss/tray-launcher-4-spring-boot/blob/master/LICENSE.md)A simple tool to use a Tray Launcher for Spring Boot Applications
## HowTo
* Add the tray launcher dependency to maven ..
```xml
org.fuchss
tray-launcher-4-spring-boot
X.Y.Z
```
* Create a simple configuration that contains at least the name, default url, and icon of your project:
```java
SpringBootTrayLauncherConfiguration conf = new SpringBootTrayLauncherConfiguration(
"Name",
"http://localhost:8080",
Main.class.getResourceAsStream("/icon.jpg")
);
```
* Modify your main class:
```java
@SpringBootApplication
@EnableAutoConfiguration
public class Main {
public static void main(final String[] args) {
// Replace SpringApplication.run(Main.class, args) by this ..
SpringBootTrayLauncherConfiguration conf = new SpringBootTrayLauncherConfiguration("Name", "http://localhost:8080", Main.class.getResourceAsStream("/icon.jpg"));
// You may add additional Urls for the launcher
conf.setAdditionalUrls(List.of(new URLEntry("Login", "http://localhost:8080/login")));
SpringBootTrayLauncher.run(Main.class, args, conf);
}
}
```
* Now you can start your application and use a simple tray icon :)![tray-example](.github/img/tray-example.png)