Coder Social home page Coder Social logo

Datasource about hibernate-adapter HOT 13 CLOSED

jcasbin avatar jcasbin commented on June 6, 2024
Datasource

from hibernate-adapter.

Comments (13)

hsluoyz avatar hsluoyz commented on June 6, 2024

@uPagge thanks for the advice!

@shy1st I think we can add a constructor for datasource arg too like the jdbc-adapter: https://github.com/jcasbin/jdbc-adapter

from hibernate-adapter.

shy1st avatar shy1st commented on June 6, 2024

@uPagge Excuse me, do you want this construction method?
捕获

from hibernate-adapter.

uPagge avatar uPagge commented on June 6, 2024

Yes that would be great

from hibernate-adapter.

hsluoyz avatar hsluoyz commented on June 6, 2024

@uPagge we are not very clear about how to implement sucha constructor, can you explain a little? Or even a PR would be great!

from hibernate-adapter.

uPagge avatar uPagge commented on June 6, 2024

Unfortunately I'm not that good: D

But I know where it is possible to spy on. Liquibase uses this, but not in the constructor is true. Perhaps the sources of Liquibase will help you understand.

изображение

from hibernate-adapter.

shy1st avatar shy1st commented on June 6, 2024

Sorry, we can get URL, driver and user name through datasource, but we can't get password. Can you provide password in the construction method? Or do you have any other ideas? @uPagge

from hibernate-adapter.

shy1st avatar shy1st commented on June 6, 2024

@uPagge Maybe the ConnectionProvider can set the datasource, but how to build SessionFactory through ConnectionProvider is a problem.May I ask you what is your idea?

from hibernate-adapter.

uPagge avatar uPagge commented on June 6, 2024

Well, my idea is that in the world of spring boot applications, database connection for libraries compatible with spring happens through this very datasource. Unfortunately, I do not know how to do this, and therefore I cannot tell. Just suggested an idea for improving convenience))

from hibernate-adapter.

shy1st avatar shy1st commented on June 6, 2024

@fangzhengjin Excuse me, may I ask you your idea?

from hibernate-adapter.

fangzhengjin avatar fangzhengjin commented on June 6, 2024

@uPagge Are you using casbin in the spring boot ?

from hibernate-adapter.

fangzhengjin avatar fangzhengjin commented on June 6, 2024

@fangzhengjin Excuse me, may I ask you your idea?

I think we can set the data source through the hibernate.connection.datasource configuration.
see: database-connectionprovider-datasource

from hibernate-adapter.

shy1st avatar shy1st commented on June 6, 2024

@fangzhengjin Thank you for your advice!

from hibernate-adapter.

hsluoyz avatar hsluoyz commented on June 6, 2024

@shy1st plz make a new release on both Maven and GitHub.

from hibernate-adapter.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.