| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <beans xmlns="http://www.springframework.org/schema/beans" |
| xmlns:context="http://www.springframework.org/schema/context" |
| xmlns:p="http://www.springframework.org/schema/p" |
| xmlns:util="http://www.springframework.org/schema/util" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans |
| https://www.springframework.org/schema/beans/spring-beans.xsd |
| http://www.springframework.org/schema/context |
| https://www.springframework.org/schema/context/spring-context.xsd |
| http://www.springframework.org/schema/util |
| https://www.springframework.org/schema/util/spring-util.xsd |
| "> |
| |
| <!-- Root Application Context for Spring Security --> |
| <!-- Scan for security configuration but exclude controllers (which belong to DispatcherServlet context) --> |
| <context:component-scan base-package="org.apache.geode.rest.internal.web"> |
| <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> |
| <context:exclude-filter type="annotation" expression="org.springframework.web.bind.annotation.RestController"/> |
| </context:component-scan> |
| |
| <!-- Diagnostic listener to track Spring context initialization --> |
| <bean class="org.apache.geode.rest.internal.web.DiagnosticContextListener"/> |
| |
| <!-- ObjectMapper bean needed by BaseControllerAdvice --> |
| <bean id="objectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean" |
| p:failOnEmptyBeans="true" |
| p:indentOutput="true" |
| p:simpleDateFormat="MM/dd/yyyy" |
| > |
| <property name="featuresToEnable"> |
| <array> |
| <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_COMMENTS"/> |
| <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_SINGLE_QUOTES"/> |
| <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT"/> |
| </array> |
| </property> |
| <property name="featuresToDisable"> |
| <array> |
| <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/> |
| </array> |
| </property> |
| </bean> |
| |
| </beans> |