Skip to content

Instantly share code, notes, and snippets.

View davsclaus's full-sized avatar

Claus Ibsen davsclaus

View GitHub Profile
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.1.RELEASE)
2018-04-11 09:54:50.196 INFO 63256 --- [ main] sample.camel.MyCamelApplication : Starting MyCamelApplication on davsclaus-pro.local with PID 63256 (/Users/davsclaus/workspace/camel/examples/camel-example-spring-boot/target/classes started by davsclaus in /Users/davsclaus/workspace/camel/examples/camel-example-spring-boot)
2018-04-11 09:54:50.199 INFO 63256 --- [ main] sample.camel.MyCamelApplication : No active profile set, falling back to default profiles: default
@davsclaus
davsclaus / gist:5b9cc17ea651ae78356777da78351468
Created March 20, 2018 14:25
camel health and info in Spring Boot 2
davsclaus:/Users/davsclaus/$ http http://localhost:8080/actuator/health
HTTP/1.1 200
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Date: Tue, 20 Mar 2018 14:21:54 GMT
Transfer-Encoding: chunked
{
"details": {
"camel": {
"details": {
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.camel.component.xchange.market.TickerConsumerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.123 s - in org.apache.camel.component.xchange.market.TickerConsumerTest
[INFO] Running org.apache.camel.component.xchange.metadata.MetaDataConsumerTest
[ERROR] Tests run: 12, Failures: 12, Errors: 0, Skipped: 0, Time elapsed: 18.061 s <<< FAILURE! - in org.apache.camel.component.xchange.metadata.MetaDataConsumerTest
[ERROR] testCurrencies(org.apache.camel.component.xchange.metadata.MetaDataConsumerTest) Time elapsed: 1.476 s <<< FAILURE!
java.lang.AssertionError: Contains ETH
at org.apache.camel.component.xchange.metadata.MetaDataConsumerTest.testCurrencies(MetaDataConsumerTest.java:62)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:55 min
[INFO] Finished at: 2017-09-14T09:00:22+02:00
[INFO] Final Memory: 1093M/2231M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project camel-spring-boot: Could not resolve dependencies for project org.apache.camel:camel-spring-boot:jar:2.20.0-SNAPSHOT: Could not find artifact org.springframework.boot:spring-boot-starter:jar:1.5.7.RELEASE in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
@davsclaus
davsclaus / gist:15ce2bc0f55849a7a0d7fc495f3faae7
Created September 13, 2017 13:03
Spring Boot 1.5.7 maven issue
curl -svo dev/null http://repo.maven.org/maven2/org/springframework/boot/spring-boot-starters/1.5.7.RELEASE/spring-boot-starters-1.5.7.RELEASE.pom
* Could not resolve host: repo.maven.org
* Closing connection 0
davsclaus:/Users/davsclaus/$ curl -svo dev/null http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starters/1.5.7.RELEASE/spring-boot-starters-1.5.7.RELEASE.pom
* Trying 151.101.36.209...
* TCP_NODELAY set
* Connected to repo1.maven.org (151.101.36.209) port 80 (#0)
> GET /maven2/org/springframework/boot/spring-boot-starters/1.5.7.RELEASE/spring-boot-starters-1.5.7.RELEASE.pom HTTP/1.1
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>3.3.5</version>
<configuration>
<enricher>
<config>
<fmp-service>
<name>helloswarm</name>
<port>9090</port>
from("trade-insight-buy")
.log("Transforming")
.transform().method(TradeDataMapper.class)
.log("Trading")
.to("day-trade-place")
.log("Done");
davsclaus:/Users/davsclaus/$ kubectl get service -w
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
helloswarm-kubernetes 10.0.0.245 <pending> 8080:30629/TCP 17h
kubernetes 10.0.0.1 <none> 443/TCP 1d
spring-kubernetes 10.0.0.85 <none> 8080/TCP 17h
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
helloswarm-kubernetes 10.0.0.245 <nodes> 8080:31211/TCP 17h
davsclaus:/Users/davsclaus/$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-world-1096927984-m0jpk 1/1 Running 0 3h
davsclaus:/Users/davsclaus/$ kubectl delete pod hello-world-1096927984-m0jpk
pod "hello-world-1096927984-m0jpk" deleted
davsclaus:/Users/davsclaus/$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-world-1096927984-90q0p 1/1 Running 0 <invalid>
davsclaus:/Users/davsclaus/$ kubectl logs -f hello-world-1096927984-90q0p
exec java -cp . -jar /deployments/helloswarm-kubernetes-2.0.0-swarm.jar
exec java -cp . -jar /deployments/helloswarm-kubernetes-2.0.0-swarm.jar
2017-03-21 10:16:42,447 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Bean Validation - STABLE org.wildfly.swarm:bean-validation:2017.3.3
2017-03-21 10:16:42,499 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Logging - STABLE org.wildfly.swarm:logging:2017.3.3
2017-03-21 10:16:42,500 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: CDI Configuration - STABLE org.wildfly.swarm:cdi-config:2017.3.3
2017-03-21 10:16:42,500 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Camel Core - STABLE org.wildfly.swarm:camel-core:2017.3.3
2017-03-21 10:16:42,500 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: CDI - STABLE org.wildfly.swarm:cdi:2017.3.3
2017-03-21 10:16:42,501 INFO [org.wildfly.swarm] (main) W