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

com.giffing.wicket.spring.boot.starter.configuration.CustomAnnotationBeanNameGenerator Maven / Gradle / Ivy

Go to download

Enables and configures Apache Wicket from within a Spring Boot Application. Used **only** in combination with Spring Boot.

There is a newer version: 4.0.0
Show newest version
package com.giffing.wicket.spring.boot.starter.configuration;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.util.StringUtils;

/**
 * To prevent spring bean naming clashes with user defined beans we will
 * prefix each bean name with wicketextension and capitalize the from spring
 * generated bean name.
 *   
 * @author Marc Giffing
 *
 */
public class CustomAnnotationBeanNameGenerator extends AnnotationBeanNameGenerator{
	
	@Override
	public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
		return "wicketextension"+StringUtils.capitalize(super.generateBeanName(definition, registry));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy