-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
140 changed files
with
5,559 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
java | ||
application | ||
} | ||
|
||
application { | ||
mainClass.set("org.objectstyle.bootique2.Main") | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
maven { | ||
url = uri("https://maven.objectstyle.org/nexus/content/repositories/bootique-snapshots/") | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":common-deep")) | ||
|
||
implementation("io.bootique:bootique:2.0-SNAPSHOT") | ||
} |
10 changes: 10 additions & 0 deletions
10
bootique-deep/src/main/java/org/objectstyle/bootique2/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.objectstyle.bootique2; | ||
|
||
import io.bootique.Bootique; | ||
|
||
public class Main { | ||
|
||
public static void main(String[] args) { | ||
Bootique.app(args).autoLoadModules().exec().exit(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
bootique-deep/src/main/java/org/objectstyle/bootique2/MainCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.objectstyle.bootique2; | ||
|
||
import io.bootique.cli.Cli; | ||
import io.bootique.command.Command; | ||
import io.bootique.command.CommandOutcome; | ||
import io.heapy.sample.common2.Service; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Provider; | ||
|
||
public class MainCommand implements Command { | ||
|
||
private Provider<Service> serviceProvider; | ||
|
||
@Inject | ||
public MainCommand(Provider<Service> serviceProvider) { | ||
this.serviceProvider = serviceProvider; | ||
} | ||
|
||
@Override | ||
public CommandOutcome run(Cli cli) { | ||
System.out.println(serviceProvider.get().name()); | ||
return CommandOutcome.succeeded(); | ||
} | ||
} |
Oops, something went wrong.