...
Code Block |
---|
## Redis Container 실행 [root@workspace-vm sanse-SanseMac:reactive-link-shortener-sample-app]# sanse$ docker run -d -p 6379:6379 --name redis redis Unable to find image 'redis:latest' locally latest: Pulling from library/redis 27833a3ba0a5f5d23c7fed46: PullAlready completeexists cde8019a4b43a4a5c04dafc1: PullAlready completeexists 97a473b37fb2605bafc84bc9: PullAlready completeexists c6fe0dfbb7e3f07a4e35cd96: PullAlready completeexists 39c8f5ba124017944e5e3eb7: PullAlready completeexists cfbdd870cf756f875a8605e0: PullAlready completeexists Digest: sha256:000339fb57e0ddf2d48d72f3341e47a8ca3b1beae9bdcb25a96323095b72a79b8888f6cd2509062a377e903e17777b4a6d59c92769f6807f034fa345da9eebcf Status: Downloaded newer image for redis:latest 8ebd440fdd83ac7cc6c55cc278aedf690420bc63cf3bb5864db12ed78247e0e8 [root@workspace-vm sanse-reactive-link3a76b32933719cd69fde6a710c1a7b897eb92d42ebcae0ef20dba675419acafb SanseMac:reactive-link-shortener-sample-app]# [root@workspace-vm sanse-reactive-link-shortener-sample-app]# sanse$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8ebd440fdd833a76b3293371 redis "docker-entrypoint.s..." 19 Aboutseconds ago a minute ago Up 17 seconds About a minute 0.0.0.0:6379->6379/tcp redis [root@workspace-vm sanse-reactive-link-SanseMac:reactive-link-shortener-sample-app]# sanse$ |
Code Block |
---|
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java "-javaagent:/Users/sanse/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.7479.19/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=49869:/Users/sanse/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.7479.19/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/lib/tools.jar:/Users/sanse/Documents/reactive-link-shortener-sample-app/target/classes:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-data-redis-reactive/2.1.0.RELEASE/spring-boot-starter-data-redis-reactive-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-data-redis/2.1.0.RELEASE/spring-boot-starter-data-redis-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/data/spring-data-redis/2.1.2.RELEASE/spring-data-redis-2.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/data/spring-data-keyvalue/2.1.2.RELEASE/spring-data-keyvalue-2.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/data/spring-data-commons/2.1.2.RELEASE/spring-data-commons-2.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-tx/5.1.2.RELEASE/spring-tx-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-oxm/5.1.2.RELEASE/spring-oxm-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-aop/5.1.2.RELEASE/spring-aop-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-context-support/5.1.2.RELEASE/spring-context-support-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/io/lettuce/lettuce-core/5.1.2.RELEASE/lettuce-core-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/io/netty/netty-common/4.1.29.Final/netty-common-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-transport/4.1.29.Final/netty-transport-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-resolver/4.1.29.Final/netty-resolver-4.1.29.Final.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-webflux/2.1.0.RELEASE/spring-boot-starter-webflux-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter/2.1.0.RELEASE/spring-boot-starter-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot/2.1.0.RELEASE/spring-boot-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-context/5.1.2.RELEASE/spring-context-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-expression/5.1.2.RELEASE/spring-expression-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.0.RELEASE/spring-boot-autoconfigure-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.1.0.RELEASE/spring-boot-starter-logging-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/sanse/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/sanse/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.11.1/log4j-to-slf4j-2.11.1.jar:/Users/sanse/.m2/repository/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar:/Users/sanse/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/sanse/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/sanse/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.1.0.RELEASE/spring-boot-starter-json-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.7/jackson-databind-2.9.7.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.7/jackson-core-2.9.7.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.7/jackson-datatype-jdk8-2.9.7.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.7/jackson-datatype-jsr310-2.9.7.jar:/Users/sanse/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.7/jackson-module-parameter-names-2.9.7.jar:/Users/sanse/.m2/repository/org/springframework/boot/spring-boot-starter-reactor-netty/2.1.0.RELEASE/spring-boot-starter-reactor-netty-2.1.0.RELEASE.jar:/Users/sanse/.m2/repository/io/projectreactor/netty/reactor-netty/0.8.2.RELEASE/reactor-netty-0.8.2.RELEASE.jar:/Users/sanse/.m2/repository/io/netty/netty-codec-http2/4.1.29.Final/netty-codec-http2-4.1.29.Final.jar:/Users/sanse/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.13.Final/hibernate-validator-6.0.13.Final.jar:/Users/sanse/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/Users/sanse/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/Users/sanse/.m2/repository/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar:/Users/sanse/.m2/repository/org/springframework/spring-web/5.1.2.RELEASE/spring-web-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-beans/5.1.2.RELEASE/spring-beans-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-webflux/5.1.2.RELEASE/spring-webflux-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/synchronoss/cloud/nio-multipart-parser/1.1.0/nio-multipart-parser-1.1.0.jar:/Users/sanse/.m2/repository/org/synchronoss/cloud/nio-stream-storage/1.1.3/nio-stream-storage-1.1.3.jar:/Users/sanse/.m2/repository/org/projectlombok/lombok/1.18.2/lombok-1.18.2.jar:/Users/sanse/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar:/Users/sanse/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/sanse/.m2/repository/io/netty/netty-codec-http/4.1.29.Final/netty-codec-http-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-codec/4.1.29.Final/netty-codec-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-handler/4.1.29.Final/netty-handler-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-buffer/4.1.29.Final/netty-buffer-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-handler-proxy/4.1.29.Final/netty-handler-proxy-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-codec-socks/4.1.29.Final/netty-codec-socks-4.1.29.Final.jar:/Users/sanse/.m2/repository/io/netty/netty-transport-native-epoll/4.1.29.Final/netty-transport-native-epoll-4.1.29.Final-linux-x86_64.jar:/Users/sanse/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.29.Final/netty-transport-native-unix-common-4.1.29.Final.jar:/Users/sanse/.m2/repository/org/springframework/spring-core/5.1.2.RELEASE/spring-core-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/org/springframework/spring-jcl/5.1.2.RELEASE/spring-jcl-5.1.2.RELEASE.jar:/Users/sanse/.m2/repository/io/projectreactor/reactor-core/3.2.2.RELEASE/reactor-core-3.2.2.RELEASE.jar:/Users/sanse/.m2/repository/org/reactivestreams/reactive-streams/1.0.2/reactive-streams-1.0.2.jar com.example.demo.DemoApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.0.RELEASE)
2019-07-21 09:17:03.854 INFO 4175 |
Code Block |
## 어플리케이션 실행 [root@workspace-vm sanse-reactive-link-shortener-sample-app]# java -jar target/demo-0.0.1-SNAPSHOT.jar & [1] 39968 [root@workspace-vm sanse-reactive-link-shortener-sample-app]# . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.0.RELEASE) 2019-05-07 12:29:28.572 INFO 39968 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication v0.0.1-SNAPSHOT on workspace-vm with PID 39968 (/root/workspace/sanse-reactive-link-shortener-sample-app/target/demo-0.0.1-SNAPSHOT.jar started by root in /root/workspace/sanse-reactive-link-shortener-sample-app) 2019-05-07 12:29:28.578 INFO 39968 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default 2019-05-07 12:29:29.347 INFO 39968 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2019-05-07 12:29:29.350 INFO 39968 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode. 2019-05-07 12:29:29.378 INFO 39968 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces. 2019-05-07 12:29:29.783 WARN 39968 --- [ main] reactorcom.nettyexample.tcp.TcpResourcesdemo.DemoApplication : Starting DemoApplication on SanseMac.local with :PID [http] resources will use the default LoopResources: DefaultLoopResources {prefix=reactor-http, daemon=true, selectCount=4, workerCount=4} 2019-05-07 12:29:29.783 WARN 399684175 (/Users/sanse/Documents/reactive-link-shortener-sample-app/target/classes started by sanse in /Users/sanse/Documents/reactive-link-shortener-sample-app) 2019-07-21 09:17:03.864 INFO 4175 --- [ main] reactorcom.nettyexample.tcpdemo.TcpResourcesDemoApplication : No :active [http] resources will use theprofile set, falling back to default ConnectionProviderprofiles: PooledConnectionProvider {name=http, poolFactory=reactor.netty.resources.ConnectionProvider$$Lambda$196/146305349@6483f5ae}default 2019-05-07-21 1209:2917:3105.012635 INFO 399684175 --- [ main] o.s.bd.webr.embedded.netty.NettyWebServer : Netty started on port(s): 8080 2019-05-07 12:29:31.016 INFO 39968c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2019-07-21 09:17:05.639 INFO 4175 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 3.06 seconds (JVM running for 3.582) [root@workspace-vm sanse-reactive-link-shortener-sample-app]# |
Code Block |
## 어플리케이션 호출 [root@workspace-vm sanse-reactive-link-shortener-sample-app]# curl -XPOST http://localhost:8080/link -H "Content-Type: application/json" -d '{"link":"http://wiki.thesanse.com"}' 2019-05-07 12:30:14.689 INFO 39968 --- [-server-epoll-6] io.lettuce.core.EpollProvider.s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode. 2019-07-21 09:17:05.682 INFO 4175 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 26ms. Found 0 repository interfaces. 2019-07-21 09:17:06.419 WARN 4175 --- [ main] reactor.netty.tcp.TcpResources : [http] resources will use the default LoopResources: Starting with epoll library DefaultLoopResources {prefix=reactor-http, daemon=true, selectCount=4, workerCount=4} 2019-0507-0721 1209:30:14.691 INFO 39968 --- [-server-epoll-6] io.lettuce.core.KqueueProvider 17:06.419 WARN 4175 --- [ : Starting without optional kqueue library {"shortenedLink":"http://localhost:8080/kRqbye"} |
Code Block |
## 어플리케이션 종료 [root@workspace-vm sanse-reactive-link-shortener-sample-app]# ps -eaf | grep java root 39968 34937 0 12:29 pts/0 00:00:08 java -jar target/demo-0.0.1-SNAPSHOT.jar root main] reactor.netty.tcp.TcpResources : [http] resources will use the default ConnectionProvider: PooledConnectionProvider {name=http, poolFactory=reactor.netty.resources.ConnectionProvider$$Lambda$194/2088582214@24fb6a80} 2019-07-21 09:17:09.606 INFO 4175 --- [ 41676 34937 0 12:47 pts/0 00:00:00 grep --color=auto java [root@workspace-vm sanse-reactive-link-shortener-sample-app]# kill -9 39968 [root@workspace-vm sanse-reactive-link-shortener-sample-app]# [1]+ Killed java -jar target/demo-0.0.1-SNAPSHOT.jar [root@workspace-vm sanse-main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port(s): 8080 2019-07-21 09:17:09.622 INFO 4175 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 6.937 seconds (JVM running for 8.438) |
Code Block |
---|
## 어플리케이션 실행 SanseMac:reactive-link-shortener-sample-app sanse$ curl -XPOST http://localhost:8080/link -H "Content-Type: application/json" -d '{"link":"http://wiki.iisanse.com"}' {"shortenedLink":"http://localhost:8080/mrfTuM"}SanseMac:reactive-link-shortener-sample-app]# sanse$ [root@workspace-vm sanse-reactive-link-shortener-sample-app]# |