Проблема с MUnit и Spring Security Schema

У меня есть проект API-kit, который включает в себя базовую аутентификацию Spring Security. Приложение собирается и успешно работает без тестов MUnit. При включении тестов MUnit не удается построить, что приводит к следующему:

WARN  2019-07-09 11:21:18,619 [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.mulesoft.org/schema/mule/spring-security/current/mule-spring-security.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

Запустив сами тесты MUnit, все проходит.

Потоки, реализующие эту безопасность, используют следующее:

<mule-ss:http-security-filter
            doc:name="API Secutiry filter"
            realm="mule-realm"
            securityProviders="delegateSecurityProvider" />

где менеджер безопасности определяется как:

<mule-ss:security-manager
    name="Spring_Security_Provider"
    doc:name="Spring Security Provider">
    <mule-ss:delegate-security-provider
        name="delegateSecurityProvider"
        delegate-ref="authenticationManager" />
</mule-ss:security-manager>

и менеджер аутентификации определяется как:

<spring:beans>
    <ss:authentication-manager alias="authenticationManager">
        <ss:authentication-provider>
            <ss:user-service id="userService">
                <ss:user
                    name="${gov.mt.dphhs.telcor.authentication.user}"
                    password="${gov.mt.dphhs.telcor.authentication.password}"
                    authorities="ROLE_ADMIN" />
            </ss:user-service>
        </ss:authentication-provider>
    </ss:authentication-manager>
</spring:beans>

Пространства имен XML следующие:

xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security"
xmlns:ss="http://www.springframework.org/schema/security"

http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/current/mule-spring-security.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd

Дополнительная информация:

<mule.version>3.8.0</mule.version>
<mule.tools.version>1.2</mule.tools.version>
<munit.version>1.3.7</munit.version>

person tbriscoe    schedule 09.07.2019    source источник
comment
может быть, мул.версия неверна? mulesoft.org/schema/mule/spring-security/3.8 попробуй только с 3.8   -  person Hinotori    schedule 10.07.2019


Ответы (1)


Кажется, вам не хватает модуля spring-security

<dependency>
  <groupId>org.mule.modules</groupId>
  <artifactId>mule-module-spring-security</artifactId>
  <version>${mule.version}</version>
</dependency>
person Diego Strubolini    schedule 07.08.2019