Questions tagged [dropwizard]

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Developed by Yammer to power their JVM-based backend services, Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done.

Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality HTTP+JSON web service in the shortest time possible.

Integration with many well-established libraries, frameworks and technologies is provided with additional official modules and community supported modules.

1905 questions
90
votes
1 answer

Advice deploying war files vs executable jar with embedded container

There seems to be a current trend in java space to move away from deploying java web applications to a java servlet container (or application server) in the form of a war file (or ear file) and instead package the application as an executable jar…
Brice Roncace
  • 8,771
  • 7
  • 54
  • 64
73
votes
1 answer

DropWizard Metrics Meters vs Timers

I am learning the DropWizard Metrics library (formerly Coda Hale metrics) and I am confused as to when I should be using Meters vs Timers. According to the docs: Meter: A meter measures the rate at which a set of events occur and: Timer: A timer…
smeeb
  • 22,487
  • 41
  • 197
  • 389
48
votes
9 answers

Change Dropwizard default ports

I have a Dropwizard based Jersey REST service running on the default ports 8080(service) and 8081(admin), I need to change the default ports to something that is less commonly used, I am not able to find any information to do so , can someone please…
user1965449
  • 2,641
  • 5
  • 30
  • 47
36
votes
6 answers

Spring - Programmatically generate a set of beans

I have a Dropwizard application that needs to generate a dozen or so beans for each of the configs in a configuration list. Things like health checks, quartz schedulers, etc. Something like this: @Component class MyModule { @Inject private…
noah
  • 20,296
  • 17
  • 59
  • 84
35
votes
2 answers

SIGTERM not received by java process using 'docker stop' and the official java image

I am running a dropwizard Java application in a Docker container using the image java:7u79 based on debian/jessie. My Java application handles the SIGTERM signal to shutdown gracefully. The SIGTERM handling works perfect when I run the application…
Sunil Kumar
  • 1,441
  • 1
  • 15
  • 30
30
votes
4 answers

How to create a one-to-many relationship with JDBI SQL object API?

I'm creating a simple REST application with dropwizard using JDBI. The next step is to integrate a new resource that has a one-to-many relationship with another one. Until now I couldn't figure out how to create a method in my DAO that retrieves a…
Tilman
  • 855
  • 1
  • 8
  • 17
28
votes
1 answer

DropWizard Bootstrap vs Configuration vs Environment

A typical DropWizard application specifies an Application subclass, and override its initialize method like so: class MyApplication extends Application { static void main(String[] args) { new MyApplication().run(args) …
IAmYourFaja
  • 50,141
  • 159
  • 435
  • 728
24
votes
2 answers

jdbi return autogenerated value on inserts

I am playing with dropwizard and I want to build a REST application that has various foreign-key relations in the entities. For example given the following 3 tables: -- table persons CREATE TABLE PUBLIC.PERSONS( ID BIGINT DEFAULT NOT NULL…
Alexander Köb
  • 904
  • 1
  • 8
  • 19
23
votes
3 answers

When to use DropWizard bundles?

I am curious about an elusive - but potentially very powerful - DropWizard feature called Bundles. According to the docs: A Dropwizard bundle is a reusable group of functionality, used to define blocks of an application’s behavior. Given that…
smeeb
  • 22,487
  • 41
  • 197
  • 389
22
votes
3 answers

Dropwizard file upload

I have to upload a file from my site yet cnt seem to get it working with drop wizard. Here is the form from my site.
Ernie
  • 477
  • 2
  • 5
  • 22
21
votes
2 answers

No session currently bound to execution context

I got below exception when I used session.getCurrentSession(). I have mentioned hibernate.current_session_context_class: managed org.hibernate.HibernateException: No session currently bound to execution context at…
Srinivas
  • 211
  • 1
  • 2
  • 5
21
votes
1 answer

DropWizard Auth by Example

I'm trying to understand how authentication and authorization work in DropWizard. I've read their auth guide as well as the dropwizard-security project on GitHub, but feel like I'm still missing a few important concepts. public class…
IAmYourFaja
  • 50,141
  • 159
  • 435
  • 728
21
votes
4 answers

Enabling cors in dropwizard not working

I'm working on a dropwizard application and js ui to interacte with the api. I need to load json data to update views but I have to enable cors in dropwizard before that. I did some staff but it seems not working because dropwizard returns allways…
naslami
  • 295
  • 1
  • 4
  • 11
20
votes
2 answers

Overriding server connector config with env variables with dropwizard

I have posted this question on dw mailing list but didnt get an answer. Can I assume the YML format below doesnt work for DW 0.7.0 anymore? (The use of @ char to insert env var) server: applicationConnectors: - type: http bindHost:…
StephenNYC
  • 1,164
  • 3
  • 10
  • 29
17
votes
3 answers

Can I have multiple configuration files in DropWizard?

I want to have several yaml files for DropWizard. One of them contain sensitive info and one non sensitive. Can you point me to any docs or example how to have multiple configurations in DropWizard?
Victor Ronin
  • 21,310
  • 16
  • 85
  • 171
1
2 3
99 100