com.jeeplus.database.datasource.DynamicDataSourceCreator.class Maven / Gradle / Ivy
???? 4 8com/jeeplus/database/datasource/DynamicDataSourceCreator java/lang/Object ub e Ljava/lang/reflect/Method; K b ALorg/springframework/jdbc/datasource/lookup/JndiDataSourceLookup; k Ljava/lang/Boolean; M G MLcom/jeeplus/database/datasource/spring/boot/autoconfigure/druid/DruidConfig; c h f I Ljava/lang/String; "com.zaxxer.hikari.HikariDataSource d Lorg/slf4j/Logger; F j a &com.alibaba.druid.pool.DruidDataSource H 0Lorg/springframework/context/ApplicationContext; 8Lorg/springframework/beans/factory/annotation/Autowired; required B
ALLATORIxDEMO QLcom/jeeplus/database/datasource/spring/boot/autoconfigure/hikari/HikariCpConfig; setGlobalPublicKey (Ljava/lang/String;)V # ( :Lcom/jeeplus/database/datasource/DynamicDataSourceCreator; createHikariDataSource f(Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty;)Ljavax/sql/DataSource; Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty - getPublicKey ()Ljava/lang/String; / 0
. 1 $org/springframework/util/StringUtils 3 isEmpty (Ljava/lang/Object;)Z 5 6
4 7 setPublicKey b(Ljava/lang/String;)Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty; 9 :
. ; getHikari S()Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/hikari/HikariCpConfig; = >
. ? $ % A Ocom/jeeplus/database/datasource/spring/boot/autoconfigure/hikari/HikariCpConfig C toHikariConfig s(Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/hikari/HikariCpConfig;)Lcom/zaxxer/hikari/HikariConfig; E F
D G getUsername I 0
. J com/zaxxer/hikari/HikariConfig L setUsername N '
M O getPassword Q 0
. R setPassword T '
M U getUrl W 0
. X
setJdbcUrl Z '
M [ getDriverClassName ] 0
. ^ setDriverClassName ` '
M a getPollName c 0
. d setPoolName f '
M g "com/zaxxer/hikari/HikariDataSource i #(Lcom/zaxxer/hikari/HikariConfig;)V k l
j m NLcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty; setDruidGlobalConfig P(Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/druid/DruidConfig;)V r createBasicDataSource java/lang/Exception u w java/lang/reflect/Method y invoke 9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; { |
z } getType ()Ljava/lang/Class; ? ?
. ?
? ? ? ? ? javax/sql/DataSource ? Hcom/jeeplus/database/datasource/exception/ErrorCreateDataSourceException ? java/lang/StringBuilder ? ()V k ?
? ? /v\|DLqvDfDaJgWq@2F`@sQwpDaLqvDfDpDa@2KsHwA2 ? &(Ljava/lang/String;)Ljava/lang/String; $ ?
? ? insert .(ILjava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? .
|a ? Ocom/jeeplus/database/datasource/spring/boot/autoconfigure/druid/DruidStatConfig ?
? ? toString ? 0
? ? k '
? ? java/lang/Throwable ?
? createJNDIDataSource *(Ljava/lang/String;)Ljavax/sql/DataSource;
? ?org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup ?
getDataSource ? ?
? ? createDataSource getJndiName ? 0
. ? java/lang/String ? ()Z 5 ?
? ? ? ?
? ? java/lang/Boolean ? booleanValue ? ?
? ? createDruidDataSource ? ,
? ? + ,
? t ,
? java/lang/Class ? getName ? 0
? ? equals ? 6
? ? getSchema ? 0
. ? hasText (Ljava/lang/String;)Z ? ?
4 ? y(Ljavax/sql/DataSource;Ljava/lang/String;Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty;)V $ ?
? getData ? 0
. ? java/lang/ClassNotFoundException ? org/slf4j/LoggerFactory ? getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; ? ?
? ? ?
? ? valueOf (Z)Ljava/lang/Boolean; ? ?
? ? /}WuaU`L|BtWsHwR}WypJ}Q