Package io.micronaut.web.router.naming
Class HyphenatedUriNamingStrategy
java.lang.Object
io.micronaut.web.router.naming.HyphenatedUriNamingStrategy
- All Implemented Interfaces:
RouteBuilder.UriNamingStrategy
- Direct Known Subclasses:
ConfigurableUriNamingStrategy
@Singleton
public class HyphenatedUriNamingStrategy
extends Object
implements RouteBuilder.UriNamingStrategy
The default
RouteBuilder.UriNamingStrategy
if none is provided by the application.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorDescriptionConstructor without context path.HyphenatedUriNamingStrategy
(@Nullable String contextPath) Constructor with optional context path. -
Method Summary
Modifier and TypeMethodDescriptionresolveUri
(BeanDefinition<?> beanDefinition) Resolve the URI to use for the given type.resolveUri
(Class type) Resolve the URI to use for the given type.resolveUri
(String property) Resolve the URI to use for the given type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.web.router.RouteBuilder.UriNamingStrategy
normalizeUri, resolveUri
-
Constructor Details
-
HyphenatedUriNamingStrategy
public HyphenatedUriNamingStrategy()Constructor without context path. -
HyphenatedUriNamingStrategy
@Inject public HyphenatedUriNamingStrategy(@Nullable @Value("${micronaut.server.context-path}") @Nullable String contextPath) Constructor with optional context path.- Parameters:
contextPath
- The context path to prefix to all URIs
-
-
Method Details
-
resolveUri
Description copied from interface:RouteBuilder.UriNamingStrategy
Resolve the URI to use for the given type.- Specified by:
resolveUri
in interfaceRouteBuilder.UriNamingStrategy
- Parameters:
type
- The type- Returns:
- The URI to use
-
resolveUri
Description copied from interface:RouteBuilder.UriNamingStrategy
Resolve the URI to use for the given type.- Specified by:
resolveUri
in interfaceRouteBuilder.UriNamingStrategy
- Parameters:
beanDefinition
- The type- Returns:
- The URI to use
-
resolveUri
Description copied from interface:RouteBuilder.UriNamingStrategy
Resolve the URI to use for the given type.- Specified by:
resolveUri
in interfaceRouteBuilder.UriNamingStrategy
- Parameters:
property
- The property- Returns:
- The URI to use
-