Skip to content

OceanBase 数据库适配

网络硬盘工程配置修改

修改网络硬盘工程 storage 配置文件

项目工程目录:risenet-y9boot-webapp-storage/src/resources/application.yml

修改数据源连接池配置

yaml
spring:
    datasource:
        druid:
            filter:
                wall:
                    #关闭Druid防御SQL注入攻击的WallFilter,不然无法操作数据库
                    enabled: false  
            y9-public:
                driver-class-name: com.mysql.cj.jdbc.Driver 
                #修改为oceanbase连接池url
                url: jdbc:mysql://obmt5wqwq8ynuyu8.huawei-cn-south-1.oceanbase.cloud:3306/y9_public  
                #修改为在oceanbase创建的账号
                username: risesoft@obmt5wqwq8ynuyu8
                #修改为在oceanbase创建的用户密码         
                password: 'RiseSoft88@@'
    jpa:
        # oceanbase可用mysql方言适配
        database-platform: org.hibernate.dialect.MySQL8Dialect
        properties:
            hibernate:
                # oceanbase可用mysql方言适配
                dialect: org.hibernate.dialect.MySQL8Dialect

Released under the GPL-3.0 License.