-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ApplicationContextPath with 0.8 doesn't work #957
Comments
Thanks for the report. A couple of remarks and questions:
Please, provide a code sample, where we can inspect a wrong behavior in 0.8.0. |
So I made the changes you told me for 1) and 2). Seems like changing 2) actually broke the application altogether and now the server itself doesn't start. Here's the error
And here's the yml
I am going to do more digging on why this happens (maybe something lingering from 0.7 upgrade to 0.8) |
So apparently the type: simple doesn't work when you want to use some specific types of properties. So getting rid of them finally got the server running but still can't get to context path. Here's the code sample:
Server Start:
Here's the output (emphasis on the context path):
Hope this helps |
@shivangshah You have to differentiate between servers and connectors. Additionally, the different types of servers (default, simple) provide different options. As @arteam already described, the application context path in |
@joschi I am not sure I understand. All the swagger integration docs with dropwizard per the following link (and many others) show how to set the basePath and they all mention the following http://stackoverflow.com/questions/23301054/how-to-use-swagger-with-dropwizard-0-7-0
I just need to get the applicationContextPath. And from the code above you can see that I do try to get it after Application#run() .. So where am I doing it wrong? And seems like it does pickup the type "default" if a type is not defined. So that's fine. |
Actually on a second run, I found the answer:
This gives me the applicationContextPath from the yml itself which is exactly what I am looking for. Thanks for the help! |
logging: while running the application it is throwing below error:
But the above example presents in dropwizard documentation. Please let me know how to solve. |
Hi,
I just upgraded to 0.8 of dropwizard and it seems like the getting of applicationContextPath doesn't work.
Output:
my yml configuration:
Any inputs on this? Is this actually a bug or something changed in 0.8 ?
The text was updated successfully, but these errors were encountered: