Хорошо, у меня есть многомодульный проект со службами в плагине и несколькими веб-приложениями, которые его используют.
Службы пользователя и проигрывателя имеют метод входа в систему и регистрации, который должен «войти» в проигрыватель путем обновления сеанса.
Этот пост: Grails получает сеанс и управление в классе обслуживания
Имеет несколько решений, но, похоже, ни одно из них не работает. Webutils недоступен ни в одном из этих мест
import org.codehaus.groovy.grails.web.util.WebUtils
import org.grails.web.util.WebUtil
import org.grails.web.util.WebUtils
и это не работает:
def session = getSession(true)
Есть предложения?
Это из build.gradle плагина:
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.1.5.Final"
compile "org.grails.plugins:scaffolding"
console "org.grails:grails-console"
profile "org.grails.profiles:plugin"
provided "org.grails:grails-plugin-services"
provided "org.grails:grails-plugin-domain-class"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-plugin-testing"
}