You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by FdezI <in...@gmail.com> on 2018/01/25 10:40:54 UTC
Field eventBus in
org.apache.shiro.spring.config.AbstractShiroConfiguration required a bean
of type 'org.apache.shiro.event.EventBus' that could not be found.
Hi, I'm having an issue with grails 3.3.2 and spring boot's shiro support. If
I use the dependency with spring boot it works just fine, but when I try to
use it in a grails project it throws the following error ( full trace here
<https://pastebin.com/gapx7qQG> ):
/Field eventBus in org.apache.shiro.spring.config.AbstractShiroConfiguration
required a bean of type 'org.apache.shiro.event.EventBus' that could not be
found./
If I declare an eventBus bean in the* resources.groovy* file (as per grails
beans docs <https://docs.grails.org/latest/guide/spring.html> ) it works in
a simple project but it gives some incompatibilities with a more complex
one, eg:
/Field grails_events_Events__eventBus in grails.plugins.mail.MailService
required a bean of type 'reactor.bus.EventBus' that could not be found.
- Bean method 'eventBus' not loaded because auto-configuration
'ReactorAutoConfiguration' was excluded/
The grail application is a simple application (created with the *grails
create-app* command). The *build.gradle* is the following:
/buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath
"gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.1"
classpath "gradle.plugin.com.energizedwork:idea-gradle-plugins:1.4"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.6"
}
}
group = 'com.example'
version '1.0-SNAPSHOT'
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.energizedwork.webdriver-binaries"
apply plugin:"com.energizedwork.idea-project-components"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
ext {
grails {
// Needed to avoid too long filenames issues
pathingJar = true
}
}
dependencies {
// Grails default
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.1.5.Final"
compile "org.grails.plugins:gsp"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.6"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:3.6.0"
testRuntime "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
testRuntime "org.seleniumhq.selenium:selenium-api:3.6.0"
// Added deps
compile 'org.apache.shiro:shiro-spring-boot-web-starter:1.4.0'
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
}
webdriverBinaries {
chromedriver '2.32'
geckodriver '0.18.0'
}
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "webdriver.chrome.driver",
System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver",
System.getProperty('webdriver.gecko.driver')
}
assets {
minifyJs = true
minifyCss = true
}/
--
Sent from: http://shiro-user.582556.n2.nabble.com/