Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MiniSpringBootTutorial/spring-boot-starter-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

16 Commits

Repository files navigation

spring-boot-start-shell

Spring Shell with Spring Boot Driven

How to use

  • Add spring-boot-starter-shell dependency in application's pom.xml:
 <dependency>
 <groupId>org.mvnsearch.spring.boot</groupId>
 <artifactId>spring-boot-starter-shell</artifactId>
 <version>1.0.0-SNAPSHOT</version>
 </dependency>
  • Add Spring Boot Maven Plugin in your pom.xml:
 <plugin>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-maven-plugin</artifactId>
 <version>1.4.0.RELEASE</version>
 <executions>
 <execution>
 <goals>
 <goal>repackage</goal>
 </goals>
 </execution>
 </executions>
 <configuration>
 <!-- do not enable it, this will creats a non standard jar and cause autoconfig to fail -->
 <executable>false</executable>
 </configuration>
 </plugin>
  • Add following code in your Spring Boot Application main method:
 @SpringBootApplication
 public class DemoApplication {
 
 public static void main(String[] args) {
 SpringShellApplication.run(DemoApplication.class, args);
 }
 }
  • Build your application and run it.
 $ mvn -DskipTests clean package
 $ java -jar target/xxxx.jar

Tips

  • Possible Configuration in your application.properties:
spring.main.banner-mode=off
  • logback-spring.xml configuration to mute some log:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <!--stdout appender-->
 <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
 <encoder>
 <pattern>%d %-5level %logger{36} - %msg%n</pattern>
 </encoder>
 </appender>
 <root level="ERROR">
 <appender-ref ref="CONSOLE"/>
 </root>
</configuration>

References

About

Spring Shell with Spring Boot Driven

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%

AltStyle によって変換されたページ (->オリジナル) /