Closed arti0798 closed 3 years ago
Can you provide a code repository that can be reproduced?
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.
Are you trying to start casbin-spring-boot-starter directly?
Are you trying to start casbin-spring-boot-starter directly?
yes I did. That from main method.
CasbinSpringBootStarterApplicationTest is this file?
yes
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.
@hsluoyz Can we move this issues to casbin-spring-boot-starter?
Then how should anyone will start the application?
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
yeah! I had already tried. But then also I got the same error.
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.
Can you provide a code repository that can reproduce this issue?
@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.
@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