Hi ,
I created two projetct,one is a “Base” project and pulished as an app component, another is a general project and depend on the “Base” project.
All of two projects have “Portal” block, when start the general project,it will throws an exeption when starting portal block. the root exception is :
Caused by: java.lang.IllegalArgumentException: A universal match pattern ('/**') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your <security:http> namespace or FilterChainProxy bean configuration
Following screenshot showing the spring config files for the portal app.
The “Base” project’s portal block can works .
Anybody can give some suggestions about this problem?
The portal-spring-security.xml in cuba framework is empty.
The portal-spring-security.xml in my base project is following: portal-security-spring.xml (2.6 KB)
The portal-security-spring.xml file is generated from template, but i have made some changes to it.
In fact problem is caused by configurations overlay. In other words security patterns are added sequentially:
CUBA config
App comp config
Project config
CUBA has no security config for portal module. Since app component config has wildcard pattern, all other patterns configured in project will be ignored.
As an option you can expose custom security config when project is used app component.
Now i understood, and i think not only the portal-spring-security.xml is overlaid , the “portal-dispatcher-spring.xml” and “portal-spring.xml” are reduplicative in app component and normal project also . I clean the spring config in normal project, now the project can start.