Chinaunix首页 | 论坛 | 博客
  • 博客访问: 614420
  • 博文数量: 298
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 3077
  • 用 户 组: 普通用户
  • 注册时间: 2019-06-17 10:57
文章分类

全部博文(298)

文章存档

2022年(96)

2021年(201)

2019年(1)

我的朋友

分类: Java

2021-06-01 07:36:58

 点击(此处)折叠或打开 


  1. 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
  2.     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
  3.     at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
  4.     ... 25 common frames omitted
  5. Caused by: java.lang.IllegalArgumentException: `flowable.common.app.idm-url` must be set
  6.     at org.springframework.util.Assert.hasText(Assert.java:289)
  7.     at org.flowable.ui.common.properties.FlowableCommonAppProperties.determineIdmAppUrl(FlowableCommonAppProperties.java:150)
  8.     at org.flowable.ui.common.service.idm.RemoteIdmServiceImpl.<init>(RemoteIdmServiceImpl.java:60)
  9.     at org.flowable.ui.common.security.FlowableUiSecurityAutoConfiguration$RemoteIdmConfiguration.remoteIdmService(FlowableUiSecurityAutoConfiguration.java:120)
  10.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  11.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  12.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  13.     at java.lang.reflect.Method.invoke(Method.java:483)
  14.     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
  15.     ... 26 common frames omitted
报错提示:`flowable.common.app.idm-url` must be set

点击(此处)折叠或打开

  1. @Autowired
  2.     protected ObjectMapper objectMapper;
  3.     protected String url;
  4.     protected String adminUser;
  5.     protected String adminPassword;
  6.     public RemoteIdmServiceImpl(FlowableCommonAppProperties properties) {
  7.         url = properties.determineIdmAppUrl();
  8.         adminUser = properties.getIdmAdmin().getUser();
  9.         Assert.hasText(adminUser, "Admin user must not be empty");
  10.         adminPassword = properties.getIdmAdmin().getPassword();
  11.         Assert.hasText(adminPassword, "Admin user password should not be empty");
  12.     }
这个是由于flowable调用自己的用户权限导致的,如果把flowable集成自己的框架里面,就不需要用它自带的用户体现和权限了


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

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

点击(此处)折叠或打开

  1. package org.flowable.ui.common.security;
  2. import org.flowable.spring.boot.FlowableSecurityAutoConfiguration;
  3. import org.flowable.spring.boot.idm.IdmEngineServicesAutoConfiguration;
  4. import org.springframework.boot.autoconfigure.AutoConfigureAfter;
  5. import org.springframework.boot.autoconfigure.AutoConfigureBefore;
  6. import org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration;
  7. import org.springframework.context.annotation.Configuration;
  8. /**
  9.  * 说明:重构FlowableUiSecurity自动配置
  10.  * From:www fhadmin org
  11.  */
  12. @Configuration(proxyBeanMethods = false)
  13. @AutoConfigureAfter({
  14.         IdmEngineServicesAutoConfiguration.class,
  15. })
  16. @AutoConfigureBefore({
  17.         FlowableSecurityAutoConfiguration.class,
  18.         OAuth2ClientAutoConfiguration.class,
  19. })
  20. public class FlowableUiSecurityAutoConfiguration {}


阅读(1392) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~