001package io.jstach.opt.spring.boot.webmvc;
002
003import org.springframework.boot.autoconfigure.AutoConfiguration;
004import org.springframework.boot.autoconfigure.AutoConfigureOrder;
005import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
006import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
007import org.springframework.context.annotation.Import;
008import org.springframework.core.Ordered;
009
010import io.jstach.jstachio.JStachio;
011
012/**
013 * Auto Configures JStachio for Spring Boot.
014 *
015 * Templates are loaded from the ServiceLoader and are then registered in the
016 * ApplicationContext. Extensions that are wired by Spring will also be discovered as well
017 * as ServiceLoader based extensions that are not already wired as beans.
018 *
019 * @author agentgt
020 * @author dsyer
021 * @apiNote while this class and methods on this class are public for Spring reflection it
022 * is not intended to be true public API.
023 */
024@AutoConfiguration(before = { ServletWebServerFactoryAutoConfiguration.class })
025@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
026@ConditionalOnClass(JStachio.class)
027@Import(JStachioConfiguration.class)
028public class JStachioAutoConfiguration {
029
030        /**
031         * Default constructor called by Spring
032         */
033        public JStachioAutoConfiguration() {
034        }
035
036}