Spring Boot Servlet Inherit Channel

Run your Spring Boot application with inherited socket created on behalf by supervisor.

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

cz.jirutka.spring
ArtifactId

ArtifactId

spring-boot-servlet-inherit-channel
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Boot Servlet Inherit Channel
Run your Spring Boot application with inherited socket created on behalf by supervisor.
Project URL

Project URL

http://github.com/jirutka/spring-boot-servlet-inherit-channel
Source Code Management

Source Code Management

http://github.com/jirutka/spring-boot-servlet-inherit-channel

Download spring-boot-servlet-inherit-channel

How to add to project

<!-- https://jarcasting.com/artifacts/cz.jirutka.spring/spring-boot-servlet-inherit-channel/ -->
<dependency>
    <groupId>cz.jirutka.spring</groupId>
    <artifactId>spring-boot-servlet-inherit-channel</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/cz.jirutka.spring/spring-boot-servlet-inherit-channel/
implementation 'cz.jirutka.spring:spring-boot-servlet-inherit-channel:0.1.1'
// https://jarcasting.com/artifacts/cz.jirutka.spring/spring-boot-servlet-inherit-channel/
implementation ("cz.jirutka.spring:spring-boot-servlet-inherit-channel:0.1.1")
'cz.jirutka.spring:spring-boot-servlet-inherit-channel:jar:0.1.1'
<dependency org="cz.jirutka.spring" name="spring-boot-servlet-inherit-channel" rev="0.1.1">
  <artifact name="spring-boot-servlet-inherit-channel" type="jar" />
</dependency>
@Grapes(
@Grab(group='cz.jirutka.spring', module='spring-boot-servlet-inherit-channel', version='0.1.1')
)
libraryDependencies += "cz.jirutka.spring" % "spring-boot-servlet-inherit-channel" % "0.1.1"
[cz.jirutka.spring/spring-boot-servlet-inherit-channel "0.1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.16

provided (4)

Group / Artifact Type Version
org.eclipse.jetty : jetty-server jar
org.slf4j : jcl-over-slf4j jar
org.springframework.boot : spring-boot jar
org.springframework.boot : spring-boot-autoconfigure jar

Project Modules

There are no modules declared in this project.

Spring Boot Servlet Inherit Channel

Build Status Codacy code quality Maven Central

TODO

Usage

Using Auto-configuration

@SpringBootApplication
@EnableServletInheritChannel
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

To start the application with inherited channel, set attribute server.inherit-channel to true (e.g. using CLI argument --server.inherit-channel=true)

Without Auto-configuration

@Configuration
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public JettyEmbeddedServletContainerFactory embeddedServletContainerFactory(
            @Value("${server.inherit-channel:false}") boolean inheritChannel) {

        JettyEmbeddedServletContainerFactory factory = new JettyEmbeddedServletContainerFactory();
        if (inheritChannel) {
            factory.addServerCustomizers(new InheritChannelJettyServerCustomizer());
        }
        return factory;
    }
}

How to get it?

Released versions are available in The Central Repository. Just add this artifact to your project:

Maven
<dependency>
    <groupId>cz.jirutka.spring</groupId>
    <artifactId>spring-boot-servlet-inherit-channel</artifactId>
    <version>0.1.1</version>
</dependency>
Gradle
compile 'cz.jirutka.spring:spring-boot-servlet-inherit-channel:0.1.1'

However if you want to use the last snapshot version, you have to add the JFrog OSS repository:

Maven
<repository>
    <id>jfrog-oss-snapshot-local</id>
    <name>JFrog OSS repository for snapshots</name>
    <url>https://oss.jfrog.org/oss-snapshot-local</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>
Gradle
repositories {
  maven {
    url 'https://oss.jfrog.org/oss-snapshot-local'
  }
}

Contributions

…are always welcome. Don’t hesitate to submit a bug report or a pull requests.

License

This project is licensed under Apache License 2.0.

Versions

Version
0.1.1
0.1.0