You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2018/09/24 02:52:00 UTC

[jira] [Comment Edited] (LOG4J2-2448) Allow usage of Versions in non-Spring environments

    [ https://issues.apache.org/jira/browse/LOG4J2-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625339#comment-16625339 ] 

Ralph Goers edited comment on LOG4J2-2448 at 9/24/18 2:51 AM:
--------------------------------------------------------------

If you had to reimplement AuditController then the Versions class shouldn't be much of a problem. Versions is used to declare the media type of the data to be produced (i.e. - the value of the ACCEPT header). We are doing API versioning using the media type. You simply need to emulate that in whatever way is compatible with JAX-RS.

If you can come up with an alternate way to get the Spring MediaType or the JAX-RS MediaType depending on which is being used I'd be open to hearing about it.


was (Author: ralph.goers@dslextreme.com):
If you had to reimplement AuditController then the Versions class shouldn't be much of a problem. Versions is used to declare the media type of the data to be produced (i.e. - the value of the ACCEPT header). We are doing API versioning using the media type. You simply need to emulate that in whatever way is compatible with JAX-RS.

> Allow usage of Versions in non-Spring environments
> --------------------------------------------------
>
>                 Key: LOG4J2-2448
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2448
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Log4j-Audit
>    Affects Versions: Log4j-Audit 1.0.0
>            Reporter: Andrei Ivanov
>            Priority: Minor
>
> As my application uses just JAX-RS, without Spring, I had to re-implement {{AuditController}} using plain JAX-RS.
> The problem is that {{Versions}} uses a Spring class, as seen [here| https://github.com/apache/logging-log4j-audit/blob/master/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/Versions.java#L34].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)