casbin / jcasbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Java
https://casbin.org
Apache License 2.0
2.38k stars 461 forks source link

@arti0798 please open a new issue for your Redis problem. This issue is only for resolving the issue for @young-zy #170

Closed arti0798 closed 3 years ago

arti0798 commented 3 years ago

@arti0798 please open a new issue for your Redis problem. This issue is only for resolving the issue for @young-zy

Originally posted by @hsluoyz in https://github.com/casbin/jcasbin/issues/158#issuecomment-812269848

fangzhengjin commented 3 years ago

Can you provide a code repository that can be reproduced?

arti0798 commented 3 years ago

Can you provide a code repository that can be reproduced?

plugins { id 'org.springframework.boot' version '2.3.5.RELEASE' id "com.jfrog.bintray" version "1.8.4" id 'java' }

apply plugin: 'io.spring.dependency-management' apply from: "maven.gradle" apply from: "bintray.gradle" apply from: "jacoco.gradle"

group = 'org.casbin' version VERSION_CODE sourceCompatibility = '1.8' compileJava.options.encoding = 'UTF-8'

bootJar.enabled = false jar.enabled = true

repositories { mavenLocal() maven { url "https://maven.aliyun.com/repository/public/" } mavenCentral() }

configurations { compileOnly { extendsFrom annotationProcessor } }

dependencies { compile 'org.casbin:jcasbin:1.6.4' compile 'com.h2database:h2' implementation 'org.springframework.boot:spring-boot-starter-jdbc'

compileOnly 'org.springframework.boot:spring-boot-starter-data-redis'
testImplementation 'org.springframework.boot:spring-boot-starter-data-redis'
testRuntimeOnly 'mysql:mysql-connector-java:5.1.47'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.casbin:casbin-spring-boot-starter:version'
// implementation 'org.springframework.boot:spring-boot-starter-data-redis:2.2.0.RELEASE'
// implementation 'redis.clients:jedis:2.8.0'
// implementation group: org.springframework.boot 
// name: spring-boot-starter-data-redis 
// version: 2.4.0-M3

}

It is build.gradle file where I had tried all possible dependecies.

fangzhengjin commented 3 years ago

Are you trying to start casbin-spring-boot-starter directly?

arti0798 commented 3 years ago

Are you trying to start casbin-spring-boot-starter directly?

yes I did. That from main method.

fangzhengjin commented 3 years ago

CasbinSpringBootStarterApplicationTest is this file?

arti0798 commented 3 years ago

yes

fangzhengjin commented 3 years ago

Casbin-spring-boot-starter does not provide a startup class because it does not support direct startup, and it needs to be introduced into the actual project to run. This file is used for testing, it will test redis-watch, so it needs to connect redis.

fangzhengjin commented 3 years ago

@hsluoyz Can we move this issues to casbin-spring-boot-starter?

arti0798 commented 3 years ago

Then how should anyone will start the application?

fangzhengjin commented 3 years ago

Introduce dependencies into your project. implementation 'org.casbin:casbin-spring-boot-starter:version' The specific configuration can be seen here: https://github.com/jcasbin/casbin-spring-boot-starter

arti0798 commented 3 years ago

yeah! I had already tried. But then also I got the same error.

arti0798 commented 3 years ago

Can you provide a code repository that can be reproduced?

plugins { id 'org.springframework.boot' version '2.3.5.RELEASE' id "com.jfrog.bintray" version "1.8.4" id 'java' }

apply plugin: 'io.spring.dependency-management' apply from: "maven.gradle" apply from: "bintray.gradle" apply from: "jacoco.gradle"

group = 'org.casbin' version VERSION_CODE sourceCompatibility = '1.8' compileJava.options.encoding = 'UTF-8'

bootJar.enabled = false jar.enabled = true

repositories { mavenLocal() maven { url "https://maven.aliyun.com/repository/public/" } mavenCentral() }

configurations { compileOnly { extendsFrom annotationProcessor } }

dependencies { compile 'org.casbin:jcasbin:1.6.4' compile 'com.h2database:h2' implementation 'org.springframework.boot:spring-boot-starter-jdbc'

compileOnly 'org.springframework.boot:spring-boot-starter-data-redis'
testImplementation 'org.springframework.boot:spring-boot-starter-data-redis'
testRuntimeOnly 'mysql:mysql-connector-java:5.1.47'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.casbin:casbin-spring-boot-starter:version'
// implementation 'org.springframework.boot:spring-boot-starter-data-redis:2.2.0.RELEASE'
// implementation 'redis.clients:jedis:2.8.0'
// implementation group: org.springframework.boot 
// name: spring-boot-starter-data-redis 
// version: 2.4.0-M3

}

It is build.gradle file where I had tried all possible dependecies.

here checkout.

fangzhengjin commented 3 years ago

Can you provide a code repository that can reproduce this issue?

hsluoyz commented 3 years ago

@hsluoyz Can we move this issues to casbin-spring-boot-starter?

@fangzhengjin It can't be done. They are in different orgs (casbin v.s. jcasbin).

@arti0798 please send issue to: https://github.com/jcasbin/casbin-spring-boot-starter/issues

This one is closed.