All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opentable.server.NonWebSetup Maven / Gradle / Ivy

Go to download

Wiring for basic Jetty core servlet regardless of MVC or JaxRS choices. Also wires logging, metrics, etc

There is a newer version: 6.0.4
Show newest version
/*
 * Licensed 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.
 */
package com.opentable.server;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import com.opentable.jackson.OpenTableJacksonConfiguration;
import com.opentable.metrics.DefaultMetricsConfiguration;
import com.opentable.pausedetector.EnablePauseDetector;
import com.opentable.service.AppInfo;
import com.opentable.service.K8sInfo;

/**
 * Common configuration for REST HTTP Server instances
 * Public so "non web users" can access.
 * If you need a http client, see the README
 *
 */
@Configuration
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import({
        // Customized object mapper
        OpenTableJacksonConfiguration.class,
        // Setup JMX server
        JmxConfiguration.class,
        K8sInfo.class,
        AppInfo.class,
        // Setup metrics
        DefaultMetricsConfiguration.class,
        StartupShutdownFailedHandler.class,
        // Spit out version info on startup
        PreFlight.class,
        // Hook up Jetty Dump as MBEAN operation
        JettyDumper.class,
        // Sets up app and environment info beans and property converters
        ServerConfigConfiguration.class,
})
@EnablePauseDetector
public @interface NonWebSetup {
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy