Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最简配置下 H2 如何生效的呢? #14

Closed
lianghujun opened this issue Oct 18, 2019 · 3 comments
Closed

最简配置下 H2 如何生效的呢? #14

lianghujun opened this issue Oct 18, 2019 · 3 comments

Comments

@lianghujun
Copy link

最简配置下 autoConfigJdbcAdapter入参 jdbcTemplate 默认使用的是h2 和HikariPool.
连接池HikariPool 是springboot 2.X 默认的 h2是怎么回事呢?

@hsluoyz
Copy link
Member

hsluoyz commented Oct 18, 2019

@fangzhengjin

@fangzhengjin
Copy link
Contributor

@lianghujun 因为 casbin-spring-boot-starter 不推荐直接使用 FileAdapter 进行策略存储,并且只支持从 FileAdapter 读取策略(如需保存至文件需要重写FileAdapter),对于不使用 FileAdapter 并且未指定存储方式时,将会使用h2进行存储(默认存储在内存中),如需指定h2存档文件位置,可参考spring boot h2相关配置

@lianghujun
Copy link
Author

谢谢啦,之前不懂自动配置原理。自己参考练习时没有配置resource/META-INF/spring.factories 。(后来的小伙伴正常集成是不需要配置的哈)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants