@Primary @Singleton @Replaces(value=HyphenatedUriNamingStrategy.class) @Requires(property="micronaut.server.context-path") public class ConfigurableUriNamingStrategy extends HyphenatedUriNamingStrategy
RouteBuilder.UriNamingStrategy
if property "micronaut.server.context-path" has been set.Constructor and Description |
---|
ConfigurableUriNamingStrategy(String contextPath)
Constructs a new uri naming strategy for the given property.
|
Modifier and Type | Method and Description |
---|---|
String |
resolveUri(BeanDefinition<?> beanDefinition)
Resolve the URI to use for the given type.
|
String |
resolveUri(Class type)
Resolve the URI to use for the given type.
|
String |
resolveUri(Class type,
PropertyConvention id)
Resolve the URI to use for the given type and route id.
|
String |
resolveUri(String property)
Resolve the URI to use for the given type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
normalizeUri
public String resolveUri(Class type)
RouteBuilder.UriNamingStrategy
resolveUri
in interface RouteBuilder.UriNamingStrategy
resolveUri
in class HyphenatedUriNamingStrategy
type
- The type@NonNull public String resolveUri(BeanDefinition<?> beanDefinition)
RouteBuilder.UriNamingStrategy
resolveUri
in interface RouteBuilder.UriNamingStrategy
resolveUri
in class HyphenatedUriNamingStrategy
beanDefinition
- The type@NonNull public String resolveUri(String property)
RouteBuilder.UriNamingStrategy
resolveUri
in interface RouteBuilder.UriNamingStrategy
resolveUri
in class HyphenatedUriNamingStrategy
property
- The property@NonNull public String resolveUri(Class type, PropertyConvention id)
RouteBuilder.UriNamingStrategy
type
- The typeid
- the route id