前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >`flowable.common.app.idm-url` must be set (flowable 6.6.0)

`flowable.common.app.idm-url` must be set (flowable 6.6.0)

原创
作者头像
FHAdmin
修改2021-06-01 10:19:51
1K0
修改2021-06-01 10:19:51
举报
文章被收录于专栏:FHADMINFHADMIN
代码语言:javascript
复制
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flowable.ui.common.service.idm.RemoteIdmService]: Factory method 'remoteIdmService' threw exception; nested exception is java.lang.IllegalArgumentException: `flowable.common.app.idm-url` must be set
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 25 common frames omitted
Caused by: java.lang.IllegalArgumentException: `flowable.common.app.idm-url` must be set
	at org.springframework.util.Assert.hasText(Assert.java:289)
	at org.flowable.ui.common.properties.FlowableCommonAppProperties.determineIdmAppUrl(FlowableCommonAppProperties.java:150)
	at org.flowable.ui.common.service.idm.RemoteIdmServiceImpl.<init>(RemoteIdmServiceImpl.java:60)
	at org.flowable.ui.common.security.FlowableUiSecurityAutoConfiguration$RemoteIdmConfiguration.remoteIdmService(FlowableUiSecurityAutoConfiguration.java:120)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 26 common frames omitted

报错提示:`flowable.common.app.idm-url` must be set

代码语言:javascript
复制
    @Autowired
    protected ObjectMapper objectMapper;

    protected String url;
    protected String adminUser;
    protected String adminPassword;

    public RemoteIdmServiceImpl(FlowableCommonAppProperties properties) {
        url = properties.determineIdmAppUrl();
        adminUser = properties.getIdmAdmin().getUser();
        Assert.hasText(adminUser, "Admin user must not be empty");
        adminPassword = properties.getIdmAdmin().getPassword();
        Assert.hasText(adminPassword, "Admin user password should not be empty");
    }

这个是由于flowable调用自己的用户权限导致的,如果把flowable集成自己的框架里面,就不需要用它自带的用户体现和权限了

出现这个问题,需要重写调用这个权限的最开始的那个类:FlowableUiSecurityAutoConfiguration

在自己项目,相同包名路径下,建个相同的类

代码语言:javascript
复制
package org.flowable.ui.common.security;

import org.flowable.spring.boot.FlowableSecurityAutoConfiguration;
import org.flowable.spring.boot.idm.IdmEngineServicesAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration;
import org.springframework.context.annotation.Configuration;

/**
 * 说明:重构FlowableUiSecurity自动配置
 * From:www.fhadmin.org
 */
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter({
        IdmEngineServicesAutoConfiguration.class,
})
@AutoConfigureBefore({
        FlowableSecurityAutoConfiguration.class,
        OAuth2ClientAutoConfiguration.class,
})
public class FlowableUiSecurityAutoConfiguration {}

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档