Skip to content

Commit

Permalink
Merge pull request #742 from jooby-project/741
Browse files Browse the repository at this point in the history
Redis 2.9.0 fix #741
  • Loading branch information
jknack authored Apr 24, 2017
2 parents 72d06e7 + 23d3b16 commit 9de3308
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 36 deletions.
35 changes: 0 additions & 35 deletions coverage-report/src/test/java/org/jooby/issues/Issue732.java

This file was deleted.

38 changes: 38 additions & 0 deletions jooby-jedis/src/main/java/redis/App732.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package redis;

import java.util.concurrent.atomic.AtomicInteger;

import org.jooby.Jooby;
import org.jooby.jedis.Redis;

import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigValueFactory;

import redis.clients.jedis.Jedis;

public class App732 extends Jooby {

{
use(ConfigFactory.empty()
.withValue("db", ConfigValueFactory.fromAnyRef("redis://localhost:6379")));

use(new Redis());

onStart(() -> {
try (Jedis jedis = require(Jedis.class)) {
jedis.set("foo", "bar");
}
});

AtomicInteger inc = new AtomicInteger();
get("/", () -> {
try (Jedis jedis = require(Jedis.class)) {
return jedis.get("foo") + ":" + inc.incrementAndGet();
}
});
}

public static void main(final String[] args) {
run(App732::new, args);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ org.eclipse.jdt.apt.processorOptions/defaultOverwrite=true
<jdbi.version>2.72</jdbi.version>
<freemarker.version>2.3.26-incubating</freemarker.version>
<camel.version>2.18.3</camel.version>
<jedis.version>2.8.1</jedis.version>
<jedis.version>2.9.0</jedis.version>
<mongo-driver-core.version>3.2.2</mongo-driver-core.version>
<mongo-java-driver.version>3.2.2</mongo-java-driver.version>
<mongodb-driver-async.version>${mongo-java-driver.version}</mongodb-driver-async.version>
Expand Down

0 comments on commit 9de3308

Please sign in to comment.