Версия jmix - 2.1.3
Установил зависимость jmix-bpm-rest-starter
Теперь в браузере после аутентификации можно запросить гет запрос к BPM:
При запросе того же URL через rest запрос с токеном аутентификации по прежнему вместо JSON получаем html страницу (скорее всего страницу login).
МОжет быть что-то не так с зависимостями или настройками:
dependencies {
implementation ‘io.jmix.core:jmix-core-starter’
implementation ‘io.jmix.data:jmix-eclipselink-starter’
implementation ‘io.jmix.security:jmix-security-starter’
implementation ‘io.jmix.security:jmix-security-flowui-starter’
implementation ‘io.jmix.security:jmix-security-data-starter’
implementation ‘io.jmix.localfs:jmix-localfs-starter’
implementation ‘io.jmix.flowui:jmix-flowui-starter’
implementation ‘io.jmix.flowui:jmix-flowui-data-starter’
implementation ‘io.jmix.flowui:jmix-flowui-themes’
implementation ‘io.jmix.datatools:jmix-datatools-starter’
implementation ‘io.jmix.datatools:jmix-datatools-flowui-starter’
implementation 'io.jmix.flowui:jmix-flowui-kit'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.hsqldb:hsqldb'
implementation 'io.jmix.bpm:jmix-bpm-starter'
implementation 'io.jmix.bpm:jmix-bpm-flowui-starter'
// my adds
implementation ‘io.jmix.rest:jmix-rest-starter’
implementation ‘io.jmix.authserver:jmix-authserver-starter’
implementation 'io.jmix.bpm:jmix-bpm-rest-starter'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'io.jmix.flowui:jmix-flowui-test-assist'
}
main.datasource.url = jdbc:hsqldb:file:.jmix/hsqldb/rnrcbpmengine
main.datasource.username = sa
main.datasource.password =
main.liquibase.change-log=com/company/rnrcbpmengine/liquibase/changelog.xml
jmix.ui.login-view-id = LoginView
jmix.ui.main-view-id = MainView
jmix.ui.menu-config = com/company/rnrcbpmengine/menu.xml
jmix.ui.composite-menu = true
ui.login.defaultUsername = admin
ui.login.defaultPassword = admin
jmix.core.available-locales = en,ru_RU
Launch the default browser when starting the application in development mode
vaadin.launch-browser = true
Use pnpm to speed up project initialization and save disk space
vaadin.pnpm.enable = true
logging.level.org.atmosphere = warn
‘debug’ level logs SQL generated by EclipseLink ORM
logging.level.eclipselink.logging.sql = info
‘debug’ level logs data store operations
logging.level.io.jmix.core.datastore = info
‘debug’ level logs access control constraints
logging.level.io.jmix.core.AccessLogger = debug
‘debug’ level logs all Jmix debug output
logging.level.io.jmix = debug
server.port=8686
#my_adds
consider disabling anonymous access to the docs in production environment by removing this property
#jmix.rest.anonymous-url-patterns = /rest/**
vaadin.exclude-urls=/rest/**
jmix.rest.authenticated-url-patterns=/rest/**
flowable.process.servlet.path=/rest/bpm/process
spring.security.oauth2.authorizationserver.client.myclient.registration.client-id=otfxlsfzpp
spring.security.oauth2.authorizationserver.client.myclient.registration.client-secret={noop}ancqRrjGLF
spring.security.oauth2.authorizationserver.client.myclient.registration.authorization-grant-types=client_credentials
spring.security.oauth2.authorizationserver.client.myclient.registration.client-authentication_methods=client_secret_basic
spring.security.oauth2.authorizationserver.client.myclient.token.access-token-format=reference
jmix.authserver.client.myclient.client-id = otfxlsfzpp
jmix.authserver.client.myclient.resource-roles = system-full-access