-
Notifications
You must be signed in to change notification settings - Fork 35
4.1.0 Deprecations and breaking changes
https://github.com/eclipse-vertx/vert.x/issues/3930
The client will not propagate anymore the HTTP headers to the next request, this responsibility has been moved to the HTTP client redirect handler to have full control over the redirected HTTP request.
Here is an excerpt of the current default redirect handler:
RequestOptions options = new RequestOptions();
options.setMethod(HttpMethod.GET);
options.setHost(uri.getHost());
options.setPort(port);
options.setSsl(ssl);
options.setURI(requestURI);
// Since 4.1.0 propagate headers
options.setHeaders(resp.request().headers());
options.removeHeader(CONTENT_LENGTH);
The new config flag systemViewExporterSpiDisabled
from the 4.0.3 release got removed again as it's not compatible with Ignite 2.10.x
In Vert.x 4.0, event bus registration data was stored in cache as org.infinispan.commons.marshall.WrappedBytes
.
This was necessary to workaround an Infinispan 11 bug with byte array storage in a multi-map cache.
Infinispan 12 has fixed this bug and using the internal WrappedBytes
is no longer necessary.
Before 4.1.0, config options were ignored if a connection string was present. They are now taken into account. Consider this configuration object:
{
mongo:{
db_name: "mydb"
connection_string: "mongodb://localhost:27017"
maxPoolSize: 10
minPoolSize: 3
}
}
Before 4.1.0, db_name
, maxPoolSize
and minPoolSize
would have been ignored.
In previous versions JWTOptions.setScopes(List<String>)
, JWTOptions.addScope(String)
and JWTOptions.withScopeDelimiter(String)
have been deprecated as they are not spec compliant. These methods have been removed as the exact same behavior can be achieved by using the vertx-web Oauth2
and JWT
handlers.
// before 4.1.0
JWTAuthOptions authConfig = new JWTAuthOptions()
.setJWTOptions(new JWTOptions()
.addScope("a")
.addScope("b")
.withScopeDelimiter(" ")));
JWTAuth authProvider = JWTAuth.create(vertx, authConfig);
router.route("/protected/*").handler(JWTAuthHandler.create(authProvider));
// with 4.1.0
JWTAuth authProvider = JWTAuth.create(vertx, new JWTAuthOptions());
router.route("/protected/*").handler(
JWTAuthHandler.create(authProvider)
.addScope("a")
.addScope("b")
.withScopeDelimiter(" "));
The JWT
handler is now the responsible to handle the scopes. The same applies to OAuth2
handler with the same API and behavior.
The LoggerHandler
custom formatter method accepting a function has been deprecated and replaced with a custom type. The original method would just receive the source HttpServerRequest
and expected a string result. This meant that users would not be able to access the context or even know the time spent.
The exception io.vertx.ext.web.handler.impl.HttpStatusException
is now public under the new name: io.vertx.ext.web.handler.HttpException
. This was a internal exception but used commonly, for that reason it is now promoted to an official API class that should follow the non breaking changes contract.