@org.springframework.context.annotation.ComponentScan

Here are the examples of the java api @org.springframework.context.annotation.ComponentScan taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

261 Examples 7

19 View Source File : FeignConfiguration.java
License : Apache License 2.0
Project Creator : zlt2000

/**
 * Description:
 * Date: 2018/12/25
 *
 * @author ujued
 */
@ComponentScan
@Configuration
@EnableFeignClients
public clreplaced FeignConfiguration {
}

19 View Source File : WebConfig.java
License : Apache License 2.0
Project Creator : yuanmabiji

@EnableWebMvc
@ComponentScan
@Configuration
public clreplaced WebConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("home");
    }

    @Bean
    public InternalResourceViewResolver viewResolver() {
        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
        viewResolver.setPrefix("/WEB-INF/views/");
        viewResolver.setSuffix(".jsp");
        return viewResolver;
    }

    @Bean
    public // Only used when running in embedded servlet
    DispatcherServlet dispatcherServlet() {
        return new DispatcherServlet();
    }

    @Override
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }
}

19 View Source File : SpringConfiguration.java
License : Apache License 2.0
Project Creator : yuanmabiji

/**
 * Spring configuration.
 *
 * @author Phillip Webb
 */
@Configuration
@EnableWebMvc
@ComponentScan
public clreplaced SpringConfiguration {
}

19 View Source File : SpringConfiguration.java
License : Apache License 2.0
Project Creator : yuanmabiji

/**
 * Spring configuration.
 *
 * @author Dave Syer
 */
@Configuration
@ComponentScan
public clreplaced SpringConfiguration implements InitializingBean {

    private String message = "Jar";

    @Override
    public void afterPropertiesSet() throws IOException {
        Properties props = new Properties();
        props.load(new ClreplacedPathResource("application.properties").getInputStream());
        String value = props.getProperty("message");
        if (value != null) {
            this.message = value;
        }
    }

    public void run(String... args) {
        System.err.println("Hello Embedded " + this.message + "!");
    }
}

19 View Source File : InRealPackageConfiguration.java
License : Apache License 2.0
Project Creator : yuanmabiji

@Configuration
@ComponentScan
public clreplaced InRealPackageConfiguration {
}

19 View Source File : InOrgSpringPackageConfiguration.java
License : Apache License 2.0
Project Creator : yuanmabiji

@Configuration
@ComponentScan
public clreplaced InOrgSpringPackageConfiguration {
}

19 View Source File : InDefaultPackageConfiguration.java
License : Apache License 2.0
Project Creator : yuanmabiji

@Configuration
@ComponentScan
public clreplaced InDefaultPackageConfiguration {
}

19 View Source File : MainConfig.java
License : Apache License 2.0
Project Creator : YihuaWanglv

@Configuration
@ComponentScan
@EnableTransactionManagement
public clreplaced MainConfig {

    @Bean
    public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
        return new PropertySourcesPlaceholderConfigurer();
    }

    @Bean
    public JpaVendorAdapter jpaVendorAdapter() {
        HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
        hibernateJpaVendorAdapter.setShowSql(true);
        hibernateJpaVendorAdapter.setGenerateDdl(true);
        hibernateJpaVendorAdapter.setDatabase(Database.MYSQL);
        return hibernateJpaVendorAdapter;
    }

    @Bean(name = "userTransaction")
    public UserTransaction userTransaction() throws Throwable {
        UserTransactionImp userTransactionImp = new UserTransactionImp();
        userTransactionImp.setTransactionTimeout(10000);
        return userTransactionImp;
    }

    @Bean(name = "atomikosTransactionManager", initMethod = "init", destroyMethod = "close")
    public TransactionManager atomikosTransactionManager() throws Throwable {
        UserTransactionManager userTransactionManager = new UserTransactionManager();
        userTransactionManager.setForceShutdown(false);
        AtomikosJtaPlatform.transactionManager = userTransactionManager;
        return userTransactionManager;
    }

    @Bean(name = "transactionManager")
    @DependsOn({ "userTransaction", "atomikosTransactionManager" })
    public PlatformTransactionManager transactionManager() throws Throwable {
        UserTransaction userTransaction = userTransaction();
        AtomikosJtaPlatform.transaction = userTransaction;
        TransactionManager atomikosTransactionManager = atomikosTransactionManager();
        return new JtaTransactionManager(userTransaction, atomikosTransactionManager);
    }
}

19 View Source File : CDPlayerConfig.java
License : Apache License 2.0
Project Creator : yihonglei

/**
 * Spring组件扫描默认是不启用的,通过@ComponentScan开启组件扫描。
 * 扫描注解所在包及子包。
 *
 * @author yihonglei
 */
@Configuration
@ComponentScan
public clreplaced CDPlayerConfig {
}

19 View Source File : ApplicationConfig.java
License : Apache License 2.0
Project Creator : yihonglei

/**
 * 1. 注解@ComponentScan开启组件扫描,Spring默认是关闭的;
 * 注解@ComponentScan扫描与Application类同级包以及子包下包含@Component的类,
 * 并在Spring上下文中创建为一个bean;
 * <p>
 * 2. 如果不想使用@ComponentScan默认扫描包,可以通过basePackages显示指定,
 * 比如: @ComponentScan(basePackages = {"com.jpeony.spring"})
 * 同时basePackages默认参数是数组,如果想指定多个扫描包,用逗号隔开就行。
 * 注解@ComponentScan还有另外一种方式就是通过basePackageClreplacedes显示指定,
 * 比如: @ComponentScan(basePackageClreplacedes = {HelloServiceImpl.clreplaced})
 * 含义就是扫描HelloServiceImpl类所在的包,也即是通过类反推出扫描包。
 *
 * @author yihonglei
 */
@Configuration
@ComponentScan
public clreplaced ApplicationConfig {
}

19 View Source File : Application.java
License : Apache License 2.0
Project Creator : yihonglei

/**
 * 1. 注解@Configuration开启组件扫描,spring默认是关闭的;
 * 2. 注解@ComponentScan默认扫描与Application类同级包以及子包下包含@Component的类,创建为bean;
 * 这里扫描com.jpeony.spring包下包含@Component类创建为bean。
 * 3. 如果不想使用@ComponentScan默认扫描包,可以通过basePackages显示指定,
 * 比如: @ComponentScan(basePackages = {"com.jpeony.spring"})
 * 同时basePackages默认参数是数组,如果想指定多个扫描包,用逗号隔开就行。
 * 注解@ComponentScan还有另外一种方式就是通过basePackageClreplacedes显示指定,
 * 比如: @ComponentScan(basePackageClreplacedes = {HelloServiceImpl.clreplaced})
 * 含义就是扫描HelloServiceImpl类所在的包,也即是通过类反推出扫描包。
 *
 * @author yihonglei
 */
@Configuration
@ComponentScan
public clreplaced Application {

    public static void main(String[] args) {
        // 通过注解形式获取bean容器(从一个或多个基于Java的配置类中加载Spring应用上下文)
        ApplicationContext context = new AnnotationConfigApplicationContext(Application.clreplaced);
        // 从容器中获取bean
        HelloService helloService = context.getBean(HelloServiceImpl.clreplaced);
        // 调用bean的方法
        helloService.sayHello("Tom");
    }
}

19 View Source File : AppConfiguration.java
License : Apache License 2.0
Project Creator : yihonglei

/**
 * @author yihonglei
 */
@Configuration
@ComponentScan
public clreplaced AppConfiguration {
}

19 View Source File : GatewayConfiguration.java
License : Apache License 2.0
Project Creator : yggdrash

@Configuration
@ComponentScan
public clreplaced GatewayConfiguration {
}

19 View Source File : WebSocketConfig.java
License : Apache License 2.0
Project Creator : yfh0918

@Configuration
@ComponentScan
@EnableAutoConfiguration
public clreplaced WebSocketConfig implements ServletContextInitializer {

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        servletContext.addListener(WebAppRootListener.clreplaced);
        servletContext.setInitParameter("org.apache.tomcat.websocket.textBufferSize", "6553600");
        servletContext.setInitParameter("org.apache.tomcat.websocket.binaryBufferSize", "6553600");
    }
}

19 View Source File : HelloWorldApplication.java
License : MIT License
Project Creator : xiuhuai

// @SpringBootApplication
@Configuration
@EnableAutoConfiguration
@ComponentScan
public clreplaced HelloWorldApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloWorldApplication.clreplaced, args);
    }
    /* public static void main(String[] args) {
		SpringApplication springApplication= new SpringApplication(HelloWorldApplication.clreplaced);
		//springApplication.run();
 //springApplication.setBannerMode(Banner.Mode.OFF);
		springApplication.run(args);
	}*/
    /*	public static void main(String[] args) {
		new SpringApplicationBuilder()
				.sources(Parent.clreplaced)
				.child(HelloWorldApplication.clreplaced)
				.run(args);
	}*/
}

19 View Source File : HelloWorldApplication.java
License : Apache License 2.0
Project Creator : xiuhuai

// @SpringBootApplication
/*用下面三个注解替代注解@SpringBootApplication*/
@Configuration
@EnableAutoConfiguration
@ComponentScan
public clreplaced HelloWorldApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloWorldApplication.clreplaced, args);
    }
    /* public static void main(String[] args) {
		SpringApplication springApplication= new SpringApplication(HelloWorldApplication.clreplaced);
		//springApplication.run();
       //springApplication.setBannerMode(Banner.Mode.OFF);
		springApplication.run(args);
	}*/
    /*创建多层次的“ApplicationContext*/
    /*	public static void main(String[] args) {
		new SpringApplicationBuilder()
				.sources(Parent.clreplaced)
				.child(HelloWorldApplication.clreplaced)
				.run(args);
}*/
}

19 View Source File : TestContextConfiguration.java
License : Apache License 2.0
Project Creator : XiaoMi

/**
 * Created by banchuanyu on 16-11-15.
 */
@Configuration
@ComponentScan
@EnableAutoConfiguration
@EnableTransactionManagement
public clreplaced TestContextConfiguration {
}

19 View Source File : WebConfig.java
License : Apache License 2.0
Project Creator : xfyun

/**
 * 配置权限url
 *
 * @author sctang2
 * @create 2017-11-10 14:46
 */
@Configuration
@EnableWebMvc
@ComponentScan
public clreplaced WebConfig extends WebMvcConfigurerAdapter implements ApplicationContextAware {

    private ApplicationContext applicationContext;

    public WebConfig() {
        super();
    }

    @Bean
    SecurityInterceptor securityInterceptor() {
        return new SecurityInterceptor();
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**/favicon.ico", "/**/index.html", "/**/static/**").addResourceLocations("clreplacedpath:/public/");
        registry.addResourceHandler("swagger-ui.html").addResourceLocations("clreplacedpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**").addResourceLocations("clreplacedpath:/META-INF/resources/webjars/");
        super.addResourceHandlers(registry);
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 拦截规则
        // 
        registry.addInterceptor(securityInterceptor()).addPathPatterns("/**").excludePathPatterns(// 
        "/", // 
        "/api/**/user/login", "/api/**/service/config/feedback", "/api/**/service/discovery/add", "/api/**/service/discovery/feedback");
        super.addInterceptors(registry);
    }
}

19 View Source File : OrderHistoryWebConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced of external APIs.
 *
 * @author  Wuyi Chen
 * @date    05/26/2020
 * @version 1.0
 * @since   1.0
 */
@Configuration
@ComponentScan
@Import(OrderHistoryDynamoDBConfiguration.clreplaced)
public clreplaced OrderHistoryWebConfiguration {
}

19 View Source File : KitchenServiceWebConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced of external APIs.
 *
 * @author  Wuyi Chen
 * @date    05/14/2020
 * @version 1.0
 * @since   1.0
 */
@Configuration
@Import(KitchenServiceConfiguration.clreplaced)
@ComponentScan
public clreplaced KitchenServiceWebConfiguration {
}

19 View Source File : KitchenServiceConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced to instantiate and wire the domain service clreplaced.
 *
 * @author  Wuyi Chen
 * @date    05/14/2020
 * @version 1.0
 * @since   1.0
 */
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories
@ComponentScan
@EnreplacedyScan
@Import({ TramEventsPublisherConfiguration.clreplaced, CommonConfiguration.clreplaced })
public clreplaced KitchenServiceConfiguration {

    @Bean
    public KitchenService kitchenService() {
        return new KitchenService();
    }
}

19 View Source File : ConsumerWebConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced to instantiate and wire the domain service clreplaced.
 *
 * @author  Wuyi Chen
 * @date    05/15/2020
 * @version 1.0
 * @since   1.0
 */
@Configuration
@ComponentScan
@Import(ConsumerServiceConfiguration.clreplaced)
public clreplaced ConsumerWebConfiguration {
}

19 View Source File : ConsumerServiceConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced to instantiate and wire the domain service clreplaced.
 *
 * @author Wuyi Chen
 * @date 05/15/2020
 * @version 1.0
 * @since 1.0
 */
@Configuration
@EnableJpaRepositories
@EnableAutoConfiguration
@Import({ SagaParticipantConfiguration.clreplaced, TramEventsPublisherConfiguration.clreplaced, CommonConfiguration.clreplaced })
@EnableTransactionManagement
@ComponentScan
public clreplaced ConsumerServiceConfiguration {

    @Bean
    public ConsumerService consumerService() {
        return new ConsumerService();
    }
}

19 View Source File : ApiGatewayIntegrationTestConfiguration.java
License : Apache License 2.0
Project Creator : wuyichen24

/**
 * The configuration clreplaced for the integration test of the API gateway.
 *
 * @author  Wuyi Chen
 * @date    05/15/2020
 * @version 1.0
 * @since   1.0
 */
@Configuration
@EnableAutoConfiguration
@ComponentScan
public clreplaced ApiGatewayIntegrationTestConfiguration {

    // Force it to be Netty to avoid casting exception in NettyWriteResponseFilter
    // Wiremock adds dependency on Jetty
    @Bean
    public NettyReactiveWebServerFactory NettyReactiveWebServerFactory() {
        return new NettyReactiveWebServerFactory();
    }
}

19 View Source File : DBBeanConfig.java
License : Apache License 2.0
Project Creator : WeBankFinTech

/**
 * BeanConfig registers system common beans.
 *
 * @author maojiayu
 * @data Dec 28, 2018 5:07:41 PM
 */
@Configuration
@ComponentScan
@EnreplacedyScan(basePackages = { "com.webank.webasebee.db.enreplacedy", "com.webank.webasebee.db.generated.enreplacedy" })
@EnableJpaRepositories(basePackages = { "com.webank.webasebee.db.repository", "com.webank.webasebee.db.generated.repository" })
public clreplaced DBBeanConfig {
}

19 View Source File : DBBeanConfig.java
License : Apache License 2.0
Project Creator : WeBankBlockchain

/**
 * BeanConfig registers system common beans.
 *
 * @author maojiayu
 * @data Dec 28, 2018 5:07:41 PM
 */
@Configuration
@ComponentScan
@EnreplacedyScan(basePackages = { "com.webank.blockchain.data.export.db.enreplacedy", "com.webank.blockchain.data.export.db.generated.enreplacedy" })
@EnableJpaRepositories(basePackages = { "com.webank.blockchain.data.export.db.repository", "com.webank.blockchain.data.export.db.generated.repository" })
public clreplaced DBBeanConfig {
}

19 View Source File : ScanningConfiguration.java
License : MIT License
Project Creator : Vip-Augus

@ComponentScan
public clreplaced ScanningConfiguration {
}

19 View Source File : ComponentScanAnnotatedConfigWithImplicitBasePackage.java
License : MIT License
Project Creator : Vip-Augus

/**
 * @author Phillip Webb
 */
@Configuration
@ComponentScan
public clreplaced ComponentScanAnnotatedConfigWithImplicitBasePackage {

    // override of scanned clreplaced
    @Bean
    public ConfigurableComponent configurableComponent() {
        return new ConfigurableComponent(true);
    }
}

19 View Source File : PersistenceJPAConfig.java
License : Apache License 2.0
Project Creator : ucarGroup

/**
 * Description: 支持外部数据源配置
 * Created on 2018/5/11 10:02
 *
 * @author 吕小玲([email protected])
 */
@Configuration
@ComponentScan
@PropertySource(value = { "clreplacedpath:/application.properties", "${spring.datasource.location}" }, ignoreResourceNotFound = true)
public clreplaced PersistenceJPAConfig {

    @Bean
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource dataSource() {
        return DataSourceBuilder.create().build();
    }
}

19 View Source File : MybatisConfig.java
License : Apache License 2.0
Project Creator : u014427391

/**
 * <pre>
 *
 * </pre>
 *
 * @author nicky
 * <pre>
 * 修改记录
 *    修改后版本:     修改人:  修改日期: 2019年12月15日  修改内容:
 * </pre>
 */
@Configuration
@EnableTransactionManagement
@ComponentScan
@MapperScan(basePackages = { "com.example.springboot.mybatis.mapper" })
public clreplaced MybatisConfig {

    // @Autowired
    // private DataSource dataSource;
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return new ConfigurationCustomizer() {

            @Override
            public void customize(org.apache.ibatis.session.Configuration configuration) {
                configuration.setMapUnderscoreToCamelCase(true);
            }
        };
    }
    // @Primary
    // @Bean(name = "sqlSessionFactory")
    // public SqlSessionFactory sqlSessionFactory() throws Exception{
    // SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
    // factoryBean.setDataSource(dataSource);
    // factoryBean.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
    // factoryBean.setConfigLocation(new ClreplacedPathResource("/mybatis/mybatis-config.xml"));
    // factoryBean.setMapperLocations(new ClreplacedPathResource("/mybatis/mapper/*.xml"));
    // return factoryBean.getObject();
    // }
    // 
    // @Primary
    // @Bean
    // public DataSourceTransactionManager transactionManager() {
    // return new DataSourceTransactionManager(dataSource);
    // }
}

19 View Source File : SpringbootHateoasApplication.java
License : Apache License 2.0
Project Creator : u014427391

@ComponentScan
@EnableAutoConfiguration
@SpringBootApplication
public clreplaced SpringbootHateoasApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootHateoasApplication.clreplaced, args);
    }
}

19 View Source File : HiveApplication.java
License : Apache License 2.0
Project Creator : tspannhw

@Configuration
@ComponentScan
@EnableAutoConfiguration
@SpringBootApplication
public clreplaced HiveApplication {

    public static void main(String[] args) {
        SpringApplication.run(HiveApplication.clreplaced, args);
    }

    // https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBC
    @Configuration
    @Profile("default")
    static clreplaced LocalConfiguration {

        Logger logger = LoggerFactory.getLogger(LocalConfiguration.clreplaced);

        @Value("${consumerkey}")
        private String consumerKey;

        @Value("${consumersecret}")
        private String consumerSecret;

        @Value("${accesstoken}")
        private String accessToken;

        @Value("${accesstokensecret}")
        private String accessTokenSecret;

        @Bean
        public Twitter twitter() {
            Twitter twitter = null;
            try {
                twitter = new TwitterTemplate(consumerKey, consumerSecret, accessToken, accessTokenSecret);
            } catch (Exception e) {
                logger.error("Error:", e);
            }
            return twitter;
        }

        @Value("${hiveuri}")
        private String databaseUri;

        @Value("${hiveusername}")
        private String username;

        @Bean
        public DataSource dataSource() {
            BasicDataSource dataSource = new BasicDataSource();
            dataSource.setUrl(databaseUri);
            dataSource.setDriverClreplacedName("org.apache.hive.jdbc.HiveDriver");
            dataSource.setUsername(username);
            logger.error("Initialized Hive");
            return dataSource;
        }
    }
}

19 View Source File : EasyFxmlNativePlatformAutoconfiguration.java
License : Apache License 2.0
Project Creator : Tristan971

@Configuration
@ComponentScan
@EnableAutoConfiguration
public clreplaced EasyFxmlNativePlatformAutoconfiguration {
}

19 View Source File : InventoryFetchApplication.java
License : Apache License 2.0
Project Creator : tmobile

/**
 * The Clreplaced InventoryFetchApplication.
 */
@Configuration
@ComponentScan
public clreplaced InventoryFetchApplication {

    /**
     * The main method.
     *
     * @param args the arguments
     * @return
     */
    @SuppressWarnings("resource")
    public static Map<String, Object> main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(InventoryFetchApplication.clreplaced);
        InventoryFetchOrchestrator orchestrator = context.getBean(InventoryFetchOrchestrator.clreplaced);
        return orchestrator.orchestrate();
    }
}

19 View Source File : AzureDiscoveryApplication.java
License : Apache License 2.0
Project Creator : tmobile

@Configuration
@ComponentScan
public clreplaced AzureDiscoveryApplication {

    public static Map<String, Object> collect(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(AzureDiscoveryApplication.clreplaced);
        AzureFetchOrchestrator orchestrator = context.getBean(AzureFetchOrchestrator.clreplaced);
        return orchestrator.orchestrate();
    }
}

19 View Source File : GraphqlJpaAutoConfiguration.java
License : MIT License
Project Creator : timtebeek

@Configuration
@ComponentScan
@SuppressWarnings("static-method")
public clreplaced GraphqlJpaAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(GraphQLExecutor.clreplaced)
    public GraphQLExecutor graphQLExecutor(final EnreplacedyManager enreplacedyManager) {
        return new GraphQLExecutor(enreplacedyManager);
    }
}

19 View Source File : MetricsCollectorConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

@ConditionalOnProperty(value = "metrics.kind", havingValue = "sql")
@Configuration
@ComponentScan
public clreplaced MetricsCollectorConfiguration {
}

19 View Source File : DBActivityTrackingConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

/**
 * Configured in spring.factories so that this configuration is automatically picked
 * up when included in the clreplacedpath.
 */
@Configuration
@ComponentScan
@ConditionalOnProperty(value = "features.dblogging.enabled", havingValue = "true")
public clreplaced DBActivityTrackingConfiguration {
    // loads other beans via @ComponentScan
}

19 View Source File : JaegerActivityTrackingConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

/**
 * Configured in spring.factories so that this configuration is automatically picked
 * up when included in the clreplacedpath.
 */
@Configuration
@ComponentScan
@ConditionalOnProperty(value = "features.jaeger-activity-tracing.enabled", havingValue = "true")
public clreplaced JaegerActivityTrackingConfiguration {

    @Value("${jaeger.query.api.url:https://syndesis-jaeger-query:443/api}")
    String jaegerQueryAPIURL;

    @Lazy
    @Bean
    public JaegerQueryAPI api() {
        return new JaegerQueryAPI(jaegerQueryAPIURL);
    }
}

19 View Source File : JsonDBConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

/**
 * Configured in spring.factories so that tis configuration is automatically picked
 * up when included in the clreplacedpath.
 */
@Configuration
@ComponentScan
public clreplaced JsonDBConfiguration {
}

19 View Source File : V1Configuration.java
License : Apache License 2.0
Project Creator : syndesisio

/**
 * Configured in spring.factories so that this configuration is automatically picked
 * up when included in the clreplacedpath.
 */
@Configuration
@ComponentScan
@ConditionalOnProperty(name = "features.api.v1.enabled")
public clreplaced V1Configuration {
}

19 View Source File : DaoConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

/**
 * Configured in spring.factories so that this configuration is automatically picked
 * up when included in the clreplacedpath.
 */
@Configuration
@ComponentScan
public clreplaced DaoConfiguration {
    // loads other beans via @ComponentScan
}

19 View Source File : ControllersConfiguration.java
License : Apache License 2.0
Project Creator : syndesisio

@Configuration
@ComponentScan
@EnableConfigurationProperties(ControllersConfigurationProperties.clreplaced)
public clreplaced ControllersConfiguration {
    // @Configuration clreplaced to load ControllersConfigurationProperties
}

19 View Source File : SSOConfig.java
License : Apache License 2.0
Project Creator : stackfing

/**
 * @Author: fing
 * @Description:
 * @Date: 下午4:56 18-1-5
 */
@Configuration
@EnableWebMvc
@ComponentScan
public clreplaced SSOConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("clreplacedpath:/static/");
    }
}

19 View Source File : SpringFoxConfiguration.java
License : Apache License 2.0
Project Creator : springside

@ComponentScan
@Configuration
public clreplaced SpringFoxConfiguration {

    // TODO: manage路径从Spring里读
    @Bean
    public Docket swaggerSpringMvcPlugin() {
        return new Docket(DoreplacedentationType.SWAGGER_2).groupName("restful-api").select().paths(Predicates.not(regex("/manage.*"))).build();
    }
}

19 View Source File : SpringTimeConfiguration.java
License : Apache License 2.0
Project Creator : springside

@ComponentScan
@Configuration
@Import(SpringFoxConfiguration.clreplaced)
public clreplaced SpringTimeConfiguration {
}

19 View Source File : SampleApplication.java
License : Apache License 2.0
Project Creator : spring-projects-experimental

@SpringBootConfiguration
@Import({ ConfigurationPropertiesAutoConfiguration.clreplaced, PropertyPlaceholderAutoConfiguration.clreplaced })
@ComponentScan
public clreplaced SampleApplication {

    @Bean
    public Foo foo() {
        return new Foo();
    }

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(SampleApplication.clreplaced);
        app.run(args);
    }

    @Bean(initMethod = "start")
    public Bar bar(Foo foo) {
        return new Bar(foo);
    }
}

19 View Source File : SampleApplication.java
License : Apache License 2.0
Project Creator : spring-projects-experimental

@SpringBootConfiguration(proxyBeanMethods = false)
@Import({ ConfigurationPropertiesAutoConfiguration.clreplaced, PropertyPlaceholderAutoConfiguration.clreplaced })
@ComponentScan
public clreplaced SampleApplication {

    @Bean
    public Foo foo() {
        return new Foo();
    }

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(SampleApplication.clreplaced);
        app.run(args);
    }

    @Bean(initMethod = "start")
    public Bar bar(Foo foo) {
        return new Bar(foo);
    }
}

19 View Source File : Stater.java
License : Apache License 2.0
Project Creator : sofastack

/**
 * Created by [email protected] on 2018/4/23.
 */
@Component
@ComponentScan
@SpringBootApplication
public clreplaced Stater {

    @Autowired
    private Registry registry;

    @PostConstruct
    public void init() {
        Counter counter = registry.counter(registry.createId("http_requests_total").withTag("instant", NetworkUtil.getLocalAddress().getHostName()));
        counter.inc();
    }

    public static void main(String[] args) {
        try {
            SpringApplication.run(Stater.clreplaced, args);
        } catch (Throwable e) {
            System.err.println(e);
        }
    }
}

19 View Source File : ComponentScanAnnotationConfiguration.java
License : Apache License 2.0
Project Creator : sfcodes

@ComponentScan
public clreplaced ComponentScanAnnotationConfiguration {
}

See More Examples