Add project description
This commit is contained in:
parent
0c36369356
commit
435b56e7b3
5 changed files with 164 additions and 3 deletions
|
@ -26,4 +26,21 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>pl.touk.mockserver.server.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -20,7 +20,7 @@ class HttpServerWraper {
|
|||
InetSocketAddress addr = new InetSocketAddress(Inet4Address.getByName("0.0.0.0"), port)
|
||||
httpServer = HttpServer.create(addr, 0)
|
||||
httpServer.executor = Executors.newCachedThreadPool()
|
||||
log.info("Http server statrting on port $port...")
|
||||
log.info("Http server starting on port $port...")
|
||||
httpServer.start()
|
||||
log.info('Http server is started')
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import groovy.util.logging.Slf4j
|
|||
@Slf4j
|
||||
class Main {
|
||||
static void main(String[] args) {
|
||||
HttpMockServer httpMockServer = new HttpMockServer()
|
||||
HttpMockServer httpMockServer = args.length == 1 ? new HttpMockServer(args[0] as int) : new HttpMockServer()
|
||||
|
||||
Runtime.runtime.addShutdownHook(new Thread({
|
||||
log.info('Http server is stopping...')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue