jcasbin / casbin-spring-boot-starter

Spring Boot 2.x & 3.x Starter for Casbin, see example at: https://github.com/jcasbin/casbin-spring-boot-example

Home Page:https://mvnrepository.com/artifact/org.casbin/casbin-spring-boot-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement the second parameter in go language to false

ezewu opened this issue · comments

commented

casbin.NewEnforcer(cfg.CasbinModelConf, false)

Sorry I didn't use go language. What's the second parameter you're referring to?

commented

The second parameter I'm referring to is how the Java library of false implements the second parameter passing false

What is the role of the second parameter false in the go language implementation?

commented

CSV files stored in database

The 2nd arg in Golang's NewEnforcer() means enableLog, see: https://casbin.org/docs/en/log-error

  1. If you need to disable the log, you can set it after getting the enforcer object. In spring, the enforcer object is a singleton.
  2. If you need to store the CSV file in the database, it is recommended to use the database tool to import directly, you can also submit a PR for this function.