LOG4J2-2448: remove dependency on Spring classes
diff --git a/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/AuditController.java b/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/AuditController.java
index d0d91b6..c36aee0 100644
--- a/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/AuditController.java
+++ b/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/AuditController.java
@@ -40,7 +40,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Generate an Audit event", notes = "Causes an Audit event to be logged", tags = {"Audit"})
-    @PostMapping(value = "/event/log", produces = Versions.V1_0_VALUE)
+    @PostMapping(value = "/event/log", produces = Versions.V1_0)
     @ResponseStatus(value = HttpStatus.OK)
     public void logEvent(@RequestBody AuditDto auditDto) {
         try {
diff --git a/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/CatalogController.java b/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/CatalogController.java
index 4af4d0d..6fcefac 100644
--- a/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/CatalogController.java
+++ b/log4j-audit/log4j-audit-war/src/main/java/org/apache/logging/log4j/audit/service/controller/CatalogController.java
@@ -174,7 +174,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Create a catalog Attribute", notes = "Creates a catalog attribute", tags = {"Catalog"})
-    @PostMapping(value = "/attribute", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PostMapping(value = "/attribute", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Attribute> createAttribute(@ApiParam(value = "attribute", required = true) @RequestBody Attribute attribute) {
         if (attribute.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required.");
@@ -197,7 +197,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Update a catalog Attribute", notes = "Updates a catalog attribute", tags = {"Catalog"})
-    @PutMapping(value = "/attribute", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PutMapping(value = "/attribute", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Attribute> updateAttribute(@ApiParam(value = "attribute", required = true) @RequestBody Attribute attribute) {
         if (attribute.getId() == null) {
             throw new IllegalArgumentException("An Attribute must have an id to be updated.");
@@ -259,7 +259,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Create a catalog Event", notes = "Creates a catalog event", tags = {"Catalog"})
-    @PostMapping(value = "/event", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PostMapping(value = "/event", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Event> createEvent(@ApiParam(value = "event", required = true) @RequestBody Event event) {
         if (event.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to create an event.");
@@ -281,7 +281,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Update a catalog Event", notes = "Updates a catalog event", tags = {"Catalog"})
-    @PutMapping(value = "/event", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PutMapping(value = "/event", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Event> updateEvent(@ApiParam(value = "event", required = true) @RequestBody Event event) {
         if (event.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to update an event.");
@@ -337,7 +337,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Create a catalog Product", notes = "Creates a catalog product", tags = {"Catalog"})
-    @PostMapping(value = "/product", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PostMapping(value = "/product", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Product> createProduct(@ApiParam(value = "product", required = true) @RequestBody Product product) {
         if (product.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to create a product.");
@@ -357,7 +357,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Update a catalog Product", notes = "Updates a catalog event", tags = {"Catalog"})
-    @PutMapping(value = "/product", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PutMapping(value = "/product", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Product> updateProduct(@ApiParam(value = "product", required = true) @RequestBody Product product) {
         if (product.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to update a product.");
@@ -410,7 +410,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Create a catalog Category", notes = "Creates a catalog category", tags = {"Catalog"})
-    @PostMapping(value = "/category", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PostMapping(value = "/category", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Category> createCategory(@ApiParam(value = "category", required = true) @RequestBody Category category) {
         if (category.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to create a category.");
@@ -430,7 +430,7 @@
 
     @ApiImplicitParams( {@ApiImplicitParam(dataType = "String", name = "Authorization", paramType = "header")})
     @ApiOperation(value = "Update a catalog Category", notes = "Updates a catalog category", tags = {"Catalog"})
-    @PutMapping(value = "/category", consumes=Versions.V1_0_VALUE, produces=Versions.V1_0_VALUE)
+    @PutMapping(value = "/category", consumes=Versions.V1_0, produces=Versions.V1_0)
     public ResponseEntity<Category> updateCategory(@ApiParam(value = "category", required = true) @RequestBody Category category) {
         if (category.getCatalogId() == null) {
             throw new IllegalArgumentException("A catalog id is required to create a category.");
diff --git a/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/Versions.java b/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/Versions.java
index 78f07f0..8a2ebfd 100644
--- a/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/Versions.java
+++ b/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/Versions.java
@@ -16,23 +16,14 @@
  */
 package org.apache.logging.log4j.catalog.api;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import org.springframework.http.MediaType;
-
 public final class Versions {
 
-    private static final String type = "application";
-    private static final String subType = "vnd.apache.logging.log4j.audit+json";
-    private static final String versionKey = "version";
-    private static final String version1 = "1.0";
-    private static final Map<String, String> V1Parameters = new HashMap<>();
-    static {
-        V1Parameters.put(versionKey, version1);
-    }
-    public static final MediaType V1_0 = new MediaType(type, subType, V1Parameters);
-    public static final String V1_0_VALUE = type + "/" + subType + "; " + versionKey + "=\"" + version1 +"\"";
+    private static final String TYPE = "application";
+    private static final String SUB_TYPE = "vnd.apache.logging.log4j.audit+json";
+    private static final String VERSION_KEY = "version";
+    private static final String VERSION_1 = "1.0";
+
+    public static final String V1_0 = TYPE + "/" + SUB_TYPE + "; " + VERSION_KEY + "=\"" + VERSION_1 +"\"";
 
     private Versions() { }
-}
+}
\ No newline at end of file