Spring Boot多数据源,集成presto访问PHONEIX数据

1 Spring Boot多数据源配置参考博客

https://www.cnblogs.com/756623607-zhang/p/11908621.html

2 参考上面的博客,关键的类修改截图

pom.xml

        <dependency>
            <groupId>io.prestosql</groupId>
            <artifactId>presto-jdbc</artifactId>
            <version>330</version>
        </dependency>

  

yml文件添加datasource信息

 presto:
      jdbc-url: jdbc:presto://hdp:9088/system/runtime?user=root
      driver-class-name: com.facebook.presto.jdbc.PrestoDriver

  

DataSourceConfig添加presto配置

常量类

使用时加注解

测试验证

原文地址:https://www.cnblogs.com/QuestionsZhang/p/12502537.html