public abstract class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource extends org.springframework.jdbc.datasource.AbstractDataSource implements org.springframework.beans.factory.InitializingBean
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
super_class: org.springframework.jdbc.datasource.AbstractDataSource
{
private java.util.Map<java.lang.Object, java.lang.Object> targetDataSources;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Ljava/lang/Object;Ljava/lang/Object;>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
private java.lang.Object defaultTargetDataSource;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
private boolean lenientFallback;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private org.springframework.jdbc.datasource.lookup.DataSourceLookup dataSourceLookup;
descriptor: Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;
flags: (0x0002) ACC_PRIVATE
private java.util.Map<java.lang.Object, javax.sql.DataSource> resolvedDataSources;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Ljava/lang/Object;Ljavax/sql/DataSource;>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
private javax.sql.DataSource resolvedDefaultDataSource;
descriptor: Ljavax/sql/DataSource;
flags: (0x0002) ACC_PRIVATE
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.springframework.jdbc.datasource.AbstractDataSource.<init>:()V
1: aload 0
iconst_1
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.lenientFallback:Z
2: aload 0
new org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup
dup
invokespecial org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup.<init>:()V
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.dataSourceLookup:Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
public void setTargetDataSources(java.util.Map<java.lang.Object, java.lang.Object>);
descriptor: (Ljava/util/Map;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.targetDataSources:Ljava/util/Map;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 2 1 targetDataSources Ljava/util/Map<Ljava/lang/Object;Ljava/lang/Object;>;
Signature: (Ljava/util/Map<Ljava/lang/Object;Ljava/lang/Object;>;)V
MethodParameters:
Name Flags
targetDataSources
public void setDefaultTargetDataSource(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.defaultTargetDataSource:Ljava/lang/Object;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 2 1 defaultTargetDataSource Ljava/lang/Object;
MethodParameters:
Name Flags
defaultTargetDataSource
public void setLenientFallback(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.lenientFallback:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 2 1 lenientFallback Z
MethodParameters:
Name Flags
lenientFallback
public void setDataSourceLookup(org.springframework.jdbc.datasource.lookup.DataSourceLookup);
descriptor: (Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ifnull 1
aload 1
goto 2
StackMap locals:
StackMap stack: org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
1: new org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup
dup
invokespecial org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup.<init>:()V
StackMap locals: org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource org.springframework.jdbc.datasource.lookup.DataSourceLookup
StackMap stack: org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource org.springframework.jdbc.datasource.lookup.DataSourceLookup
2: putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.dataSourceLookup:Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 4 1 dataSourceLookup Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
dataSourceLookup
public void afterPropertiesSet();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.targetDataSources:Ljava/util/Map;
ifnonnull 2
1: new java.lang.IllegalArgumentException
dup
ldc "Property 'targetDataSources' is required"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
new java.util.HashMap
dup
aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.targetDataSources:Ljava/util/Map;
invokeinterface java.util.Map.size:()I
invokespecial java.util.HashMap.<init>:(I)V
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDataSources:Ljava/util/Map;
3: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.targetDataSources:Ljava/util/Map;
aload 0
invokedynamic accept(Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;)Ljava/util/function/BiConsumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;Ljava/lang/Object;)V
org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.lambda$0(Ljava/lang/Object;Ljava/lang/Object;)V (7)
(Ljava/lang/Object;Ljava/lang/Object;)V
invokeinterface java.util.Map.forEach:(Ljava/util/function/BiConsumer;)V
4: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.defaultTargetDataSource:Ljava/lang/Object;
ifnull 6
5: aload 0
aload 0
aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.defaultTargetDataSource:Ljava/lang/Object;
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolveSpecifiedDataSource:(Ljava/lang/Object;)Ljavax/sql/DataSource;
putfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDefaultDataSource:Ljavax/sql/DataSource;
6: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
protected java.lang.Object resolveSpecifiedLookupKey(java.lang.Object);
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 1 1 lookupKey Ljava/lang/Object;
MethodParameters:
Name Flags
lookupKey
protected javax.sql.DataSource resolveSpecifiedDataSource(java.lang.Object);
descriptor: (Ljava/lang/Object;)Ljavax/sql/DataSource;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof javax.sql.DataSource
ifeq 2
1: aload 1
checkcast javax.sql.DataSource
areturn
2: StackMap locals:
StackMap stack:
aload 1
instanceof java.lang.String
ifeq 4
3: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.dataSourceLookup:Lorg/springframework/jdbc/datasource/lookup/DataSourceLookup;
aload 1
checkcast java.lang.String
invokeinterface org.springframework.jdbc.datasource.lookup.DataSourceLookup.getDataSource:(Ljava/lang/String;)Ljavax/sql/DataSource;
areturn
4: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
5: new java.lang.StringBuilder
dup
ldc "Illegal data source value - only [javax.sql.DataSource] and String supported: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 7 1 dataSource Ljava/lang/Object;
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
dataSource
public java.sql.Connection getConnection();
descriptor: ()Ljava/sql/Connection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineTargetDataSource:()Ljavax/sql/DataSource;
invokeinterface javax.sql.DataSource.getConnection:()Ljava/sql/Connection;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
Exceptions:
throws java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineTargetDataSource:()Ljavax/sql/DataSource;
aload 1
aload 2
invokeinterface javax.sql.DataSource.getConnection:(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 1 1 username Ljava/lang/String;
0 1 2 password Ljava/lang/String;
Exceptions:
throws java.sql.SQLException
MethodParameters:
Name Flags
username
password
public <T> T unwrap(java.lang.Class<T>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual java.lang.Class.isInstance:(Ljava/lang/Object;)Z
ifeq 2
1: aload 0
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineTargetDataSource:()Ljavax/sql/DataSource;
aload 1
invokeinterface javax.sql.DataSource.unwrap:(Ljava/lang/Class;)Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 3 1 iface Ljava/lang/Class<TT;>;
Exceptions:
throws java.sql.SQLException
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)TT;
MethodParameters:
Name Flags
iface
public boolean isWrapperFor(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokevirtual java.lang.Class.isInstance:(Ljava/lang/Object;)Z
ifne 1
aload 0
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineTargetDataSource:()Ljavax/sql/DataSource;
aload 1
invokeinterface javax.sql.DataSource.isWrapperFor:(Ljava/lang/Class;)Z
ifne 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 2 1 iface Ljava/lang/Class<*>;
Exceptions:
throws java.sql.SQLException
Signature: (Ljava/lang/Class<*>;)Z
MethodParameters:
Name Flags
iface
protected javax.sql.DataSource determineTargetDataSource();
descriptor: ()Ljavax/sql/DataSource;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDataSources:Ljava/util/Map;
ldc "DataSource router not initialized"
invokestatic org.springframework.util.Assert.notNull:(Ljava/lang/Object;Ljava/lang/String;)V
1: aload 0
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineCurrentLookupKey:()Ljava/lang/Object;
astore 1
start local 1 2: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDataSources:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast javax.sql.DataSource
astore 2
start local 2 3: aload 2
ifnonnull 5
aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.lenientFallback:Z
ifne 4
aload 1
ifnonnull 5
4: StackMap locals: java.lang.Object javax.sql.DataSource
StackMap stack:
aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDefaultDataSource:Ljavax/sql/DataSource;
astore 2
5: StackMap locals:
StackMap stack:
aload 2
ifnonnull 7
6: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Cannot determine target DataSource for lookup key ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
2 8 1 lookupKey Ljava/lang/Object;
3 8 2 dataSource Ljavax/sql/DataSource;
protected abstract java.lang.Object determineCurrentLookupKey();
descriptor: ()Ljava/lang/Object;
flags: (0x0404) ACC_PROTECTED, ACC_ABSTRACT
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
private void lambda$0(java.lang.Object, java.lang.Object);
descriptor: (Ljava/lang/Object;Ljava/lang/Object;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolveSpecifiedLookupKey:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
start local 3 1: aload 0
aload 2
invokevirtual org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolveSpecifiedDataSource:(Ljava/lang/Object;)Ljavax/sql/DataSource;
astore 4
start local 4 2: aload 0
getfield org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.resolvedDataSources:Ljava/util/Map;
aload 3
aload 4
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 4 end local 3 3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource;
0 4 1 key Ljava/lang/Object;
0 4 2 value Ljava/lang/Object;
1 3 3 lookupKey Ljava/lang/Object;
2 3 4 dataSource Ljavax/sql/DataSource;
}
SourceFile: "AbstractRoutingDataSource.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles