http-service: add cache service

This commit is contained in:
Adam
2017-09-11 16:17:59 -04:00
parent a005ad0924
commit 94530bda30
17 changed files with 1791 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ package net.runelite.http.service;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import javax.naming.NamingException;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
@@ -44,8 +45,15 @@ public class SpringBootWebApplicationTest
{
Map<Class, Converter> converters = new HashMap<>();
converters.put(Instant.class, new InstantConverter());
return new Sql2o("jdbc:mysql://192.168.1.2/runelite", "adam", "", new NoQuirks(converters));
return new Sql2o("jdbc:mysql://localhost/runelite", "root", "", new NoQuirks(converters));
}
@Bean("Runelite Cache SQL2O")
Sql2o cacheSql2o() throws NamingException
{
Map<Class, Converter> converters = new HashMap<>();
converters.put(Instant.class, new InstantConverter());
return new Sql2o("jdbc:mysql://localhost/cache", "root", "", new NoQuirks(converters));
}
@Test

View File

@@ -1,2 +1,7 @@
oauth.client-id=moo
oauth.client-secret=cow
oauth.client-secret=cow
minio.endpoint=http://10.96.22.171:9000
minio.accesskey=AM54M27O4WZK65N6F8IP
minio.secretkey=/PZCxzmsJzwCHYlogcymuprniGCaaLUOET2n6yMP
minio.bucket=runelite
auth.password=password