@Bean
	public AuthorProvider authorProvider() {
		return () -> {
			final SecurityContext context = SecurityContextHolder.getContext();
			if (context != null && context.getAuthentication() != null) {
				return context.getAuthentication().getPrincipal().toString();
			} else {
				return "system";
			}
		};
	}
@Bean
	public AuthorProvider authorProvider() {
		return () -> {
			final SecurityContext context = SecurityContextHolder.getContext();
			if (context != null && context.getAuthentication() != null) {
				return context.getAuthentication().getPrincipal().toString();
			} else {
				return "system";
			}
		};
	}
@ Bean public AuthorProvider authorProvider ( ) { return ( ) -> { final SecurityContext context = SecurityContextHolder . getContext ( ) ; if ( context != null && context . getAuthentication ( ) != null ) { return context . getAuthentication ( ) . getPrincipal ( ) . toString ( ) ; } else { return "system" ; } } ; }
Author provider.

@return the author provider
Author provider .