https://github.com/mikoweb/java-console-application
Sample console application written in Java and Spring Shell.
https://github.com/mikoweb/java-console-application
console java spring
Last synced: 2 months ago
JSON representation
Sample console application written in Java and Spring Shell.
- Host: GitHub
- URL: https://github.com/mikoweb/java-console-application
- Owner: mikoweb
- Created: 2023-05-04T22:11:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-11T20:12:06.000Z (almost 3 years ago)
- Last Synced: 2025-07-20T16:02:32.130Z (11 months ago)
- Topics: console, java, spring
- Language: Java
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Sample Console Application
Go to `src/main/java/app/module/sample/application/command` directory to show commands source code.
## Installation
mvn dependency:copy-dependencies
## Build JAR and run
Build:
mvn clean compile spring-boot:process-aot package
In Idea IDE use tab `Maven` -> `Execute Maven Goal` button.
Run:
java -jar target/JavaConsoleLearn-1.0-SNAPSHOT.jar
## Build a native executable
* [Ahead of Time Optimizations in Spring 6](https://www.baeldung.com/spring-6-ahead-of-time-optimizations)
* [Spring - GraalVM Native Image Support](https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.developing-your-first-application.buildpacks.maven)
Install GraalVM Community:
https://www.graalvm.org/downloads/
bash <(curl -sL https://get.graalvm.org/jdk)
cd /path/to/graalvm/bin
./gu install native-image
Add `GRAALVM_HOME` to `.profile`
export GRAALVM_HOME="/path/to/graalvm/bin/native-image"
Build:
mvn clean compile spring-boot:process-aot package
mvn -Pnative native:compile-no-fork
In Idea IDE use tab `Maven` -> `Execute Maven Goal` button.
### Execute native app
target/console
## Copyrights
Copyright (c) Rafał Mikołajun 2023.