("com.sun.jersey.api.json.POJOMappingFeature", Boolean.TRUE.toString());
is used to provide a POJO Support whereas in 2.x, Jersey has few of the auto discoverable features like JSON Binding where we just have to add the dependency in the pom so that they get loaded in the classpath.
("com.sun.jersey.config.property.resourceConfigClass","com.sun.jersey.api.core.PackagesResourceConfig")
is used to create an instance of resourceConfigClass. Although in few of the forums it is mentioned that even if it's not instantiated it would create an instance on a fly to add resources. Now in 2.x if ServerProperties.PROVIDER_PACKAGES is used then source code of ServletContainer also confirms the same so we should not need to instantiate resourceConfigClass separately. So, this parameter can easily be removed.
(PackagesResourceConfig.PROPERTY_PACKAGES,
String.format("%s;%s", ThrowableMapper.class.getPackage().getName(), packageName));
ServerProperties.PROVIDER_PACKAGES should be used for above code instead of PackagesResourceConfig.PROPERTY_PACKAGES.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…