Hi,

You could (mis-) use Hibernate Validator for this and add a validation method 
with @AssertTrue to your configuration file in which you check the 
applicationContextPath.

@AssertTrue
public boolean validateApplicationContextPath() {
    return server.getApplicationContextPath().equals("…“);
}

Cheers,
Jochen

> Am 12.09.2022 um 18:16 schrieb Innokentiy Struchkov 
> <[email protected]>:
> 
> Hi! I'm upgrading an old server to newer version of Dropwizard (1.x.x to 
> 2.1.0) and other dependencies too. Now I have to explicitly check if user set 
> the only correct applicationContextPath in server section of configuration 
> file. Is there a way to do this in our Configuration implementation in 
> constructor code (or within init block in Kotlin) or bootstrap initialization?

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-user/DD5F3983-F24F-4BC9-A702-18AB26C9ED89%40schalanda.name.

Reply via email to