@@ -33,36 +33,34 @@ public class RedissonStack extends CoreStack {
3333 * https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details
3434 */
3535 public static String getFullConnectionURL (GenericConvertMap <String , Object > config ) {
36- // Get the DB name (required)
37-
38- // Redis db are labelled from 0 to 15
39- String dbname = config .getString ("name" , null );
40- if (dbname == null || dbname .isEmpty ()) {
41- throw new IllegalArgumentException ("Missing database 'name' for redis config" );
42- }
4336
4437 // Get the full connection url, and use it if present
4538 String full_url = config .getString ("full_url" , null );
4639 if (full_url != null ) {
4740 return full_url ;
4841 }
4942
43+ // Get the DB name (required)
44+ // Redis db are labelled from 0 to 15
45+ String dbname = config .getString ("name" , null );
46+ if (dbname == null || dbname .isEmpty ()) {
47+ throw new IllegalArgumentException ("Missing database 'name' for redis config" );
48+ }
49+
5050 // Lets get the config respectively
5151 String protocol = config .getString ("protocol" , "redis" );
5252 String user = config .getString ("user" , null );
5353 String pass = config .getString ("pass" , null );
5454 String host = config .getString ("host" , "172.17.0.1" ); //default docker ip
5555 int port = config .getInt ("port" , 6379 ); //default redis port
56- String opts = config .getString ("opt_str" ,
57- "r=majority&w=majority&retryWrites=true&maxPoolSize=50" );
5856
5957 // Lets build the auth str
6058 String authStr = "" ;
6159 if (user != null && pass != null ) {
6260 authStr = user + ":" + pass + "@" ;
6361 }
6462
65- return protocol + "://" + authStr + host + ":" + port + "/" + dbname + "?" + opts ;
63+ return protocol + "://" + authStr + host + ":" + port + "/" + dbname ;
6664 }
6765
6866 /**
@@ -71,7 +69,6 @@ public static String getFullConnectionURL(GenericConvertMap<String, Object> conf
7169 public static RedissonClient setupFromConfig (GenericConvertMap <String , Object > inConfig ) {
7270 // Get the full_url
7371 String full_url = getFullConnectionURL (inConfig );
74- System .out .println (full_url );
7572
7673 // Apply config
7774 Config config = new Config ();
0 commit comments