com.jeeplus.modules.database.DataSourcePlugin.class Maven / Gradle / Ivy
???? 4 ? -com/jeeplus/modules/database/DataSourcePlugin java/lang/Object *org/springframework/boot/ApplicationRunner ka *Lorg/springframework/stereotype/Component; ELorg/springframework/boot/context/properties/ConfigurationProperties; prefix ds.plugin 7Lorg/springframework/context/annotation/PropertySource; value &classpath:datasource-plugin.properties encoding UTF-8 G ALcom/jeeplus/modules/database/datalink/service/DataSourceService; 8Lorg/springframework/beans/factory/annotation/Autowired; D 2Lcom/jeeplus/modules/database/config/DsProperites; I 3Lcom/jeeplus/modules/database/datalink/jdbc/DBPool; E Ljavax/sql/DataSource; g Ljava/lang/String; H F L
ALLATORIxDEMO setSite (Ljava/lang/String;)V " a /Lcom/jeeplus/modules/database/DataSourcePlugin; getName ()Ljava/lang/String; (
getVersion + setName setDescription / run 2(Lorg/springframework/boot/ApplicationArguments;)V java/lang/Exception 3 1com/jeeplus/modules/database/datalink/jdbc/DBPool 5 getInstance 5()Lcom/jeeplus/modules/database/datalink/jdbc/DBPool; 7 8
6 9 ; addMaster K(Ljavax/sql/DataSource;)Lcom/jeeplus/modules/database/datalink/jdbc/DBPool; = >
6 ? A 7com/jeeplus/modules/database/datalink/entity/DataSource C ()V E F
D G ?com/jeeplus/modules/database/datalink/service/DataSourceService I findAllList A(Lcom/jeeplus/database/persistence/DsDataEntity;)Ljava/util/List; K L
J M java/util/List O iterator ()Ljava/util/Iterator; Q R P S java/util/Iterator U hasNext ()Z W X V Y next ()Ljava/lang/Object; [ \ V ] _ getEnName a '
D b getDriver d '
D e getUrl g '
D h &org/springframework/web/util/HtmlUtils j htmlUnescape &(Ljava/lang/String;)Ljava/lang/String; l m
k n getUsername p '
D q getPassword s '
D t create ?(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/jeeplus/modules/database/datalink/jdbc/DBPool; v w
6 x java/lang/System z out Ljava/io/PrintStream; | } { ~ java/lang/StringBuilder ?
? G づ ? Lcom/jeeplus/database/datasource/spring/boot/autoconfigure/DataSourceProperty ? m
? ? insert .(ILjava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? &