diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2022-02-01 15:16:25 -0600 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-02-22 20:02:46 +0000 |
commit | 60c1a4038e041a342dda9810e6fd761d66b01bdb (patch) | |
tree | 0e76b4252e4d7d257cf4ddcb6f081996bb1e03ab /server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java | |
parent | 9694d4113bf401b84e86e0223dbea8f5339388d8 (diff) | |
download | sonarqube-60c1a4038e041a342dda9810e6fd761d66b01bdb.tar.gz sonarqube-60c1a4038e041a342dda9810e6fd761d66b01bdb.zip |
SONAR-15994 Migrate Sonarqube IOC framework from Pico to Spring
Diffstat (limited to 'server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java index bf75d7a5965..d128c08158f 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java @@ -157,16 +157,19 @@ import org.sonar.db.user.UserTokenDto; import org.sonar.db.user.UserTokenMapper; import org.sonar.db.webhook.WebhookDeliveryMapper; import org.sonar.db.webhook.WebhookMapper; +import org.springframework.beans.factory.annotation.Autowired; public class MyBatis implements Startable { private final List<MyBatisConfExtension> confExtensions; private final Database database; private SqlSessionFactory sessionFactory; + @Autowired(required = false) public MyBatis(Database database) { this(database, null); } + @Autowired(required = false) public MyBatis(Database database, @Nullable MyBatisConfExtension[] confExtensions) { this.confExtensions = confExtensions == null ? Collections.emptyList() : Arrays.asList(confExtensions); this.database = database; |