Comments (15)
Holy. And within a minute of reporting this, the light went on to look at the alternate constructors for AssetsBundle, finding one where I set the maxCacheSize to 0, and voila, works...
Silly me.
from dropwizard.
Hello,
I know I comment a one year old issue, but I have the same problem AND this solution is not working anymore:
AssetsBundle has no maxCacheSize property anymore.
Have you find another way to set that?
Thanks
from dropwizard.
You'll need to figure out how to get your IDE to update resources in the classpath.
For IntelliJ, this means running the Dropwizard application in Debug mode and executing Run | Reload Changed Classes
.
Dropwizard does not support a "dev mode", nor do I have any plans to add one.
from dropwizard.
Actually, I use Eclipse, and with "Automatic Build", resources are systematically copied from src/main/resources to /target/classes
I just made a test to be sure :)
So I thought it was some kind of cache...
As my webpages are 100% static, I can still use the jettyRun maven plugin on the side for dev and start both Dropwizard and this Jetty
from dropwizard.
Apparently it's windows specific, and it has changed since Jetty 8:
Here's proposed solution, that I'm not able to really understand:
http://stackoverflow.com/a/16235377
In DW config, I can set connectorType, and all the buffer'sizes but not the buffer's types.
Regards
from dropwizard.
I found it - just add in your config file:
http:
useDirectBuffers: false
Works perfectly now :)
from dropwizard.
since 0.7.0 there is no useDirectBuffers option.
from dropwizard.
OK. It is 2015 today. Any solution for this? Every time compiling when changing code in views is really killing time.
from dropwizard.
I do this by using grunt and a few grunt tasks (grunt-watch, grunt-clean and grunt-copy) to update my assets files in the build directory.
when you have grunt-watch running all you have to do is make the changes to you assets files and then grunt will replace the files in your build directory so you can just refresh your webpage and get the changes.
I know this isnt a solution to the issue but its a decent work around :)
from dropwizard.
Here's a solution on DW 0.7.1:
- do not use the AssetBundle as you don't have access to all the details (don't worry it's a very tiny Bundle)
- Add the AssetsServlet directly from the run method of your Application class
- configure the mapping
- add the desired initParameter (http://www.eclipse.org/jetty/documentation/current/troubleshooting-locked-files-on-windows.html)
- maybe add some way to enable/disable this, as it's usefull in dev mode, but not in production
Dynamic dynamic = environment.admin().addServlet("assets", new AssetServlet("/website", "/admin-site/", "index.html", Charsets.UTF_8));
dynamic.addMapping("/admin-site/*");
if(devMode){
dynamic.setInitParameter("useFileMappedBuffer", "false");
}
from dropwizard.
For Eclipse is good to use Filesync plugin, as it explained here http://www.onehippo.org/library/development/use-filesync-eclipse-plugin-for-faster-turn-around.html
from dropwizard.
Dynamic dynamic = environment.admin().addServlet("assets", new AssetServlet("/website", "/admin-site/", "index.html", Charsets.UTF_8));
dynamic.addMapping("/admin-site/*");
if(devMode){
dynamic.setInitParameter("useFileMappedBuffer", "false");
}
Works for me in DW 0.9.
I use this and set my js build tool to copy the bundles into ./target/classes/assets/
from dropwizard.
Should we always default this parameter to false
or make AssetBundle
be configurable?
from dropwizard.
+1 on making AssetBundle
configurable. Is there a plan to support "dev mode"?
from dropwizard.
I think it's good for production use, but very annoying for developing with.
Not sure if it should be configurable or not, but maybe DW could use an overall devmode? This has probably been discussed before though.
On the other hand it is part of dropwizard-assets
, so it could be fine to add it to AssetBundle
?
I'm guess it is something everyone using assets in dropwizard has to deal with.
from dropwizard.
Related Issues (20)
- Custom error page for AssetsBundle HOT 3
- Bug in hibernate 6.1.7 HOT 1
- Access log should contain the name of the authenticated user HOT 1
- Incorrect bouncy castle artifact is using under DW 4.x and 3.x version HOT 1
- Jetty 11.0.x CVE-2023-36479 and CVE-2023-40167 HOT 2
- Gradle dependency issue in v3.0.2 with Guava and Findbugs HOT 2
- Is Dropwizard affected by CVE-2023-44487? HOT 3
- Vulnerability issues with dependencies in dropwizard 4.0.1 HOT 1
- Vulnerability issues with dependencies in dropwizard 4.0.1 HOT 1
- IlligalAccesException : module com.fasterxml.jackson.module.blackbird does not read module *** HOT 12
- Incorrect javadocs for io.dropwizard.logging.common.AppenderFactory
- Dropwizard 4.0.3 not logging request logs HOT 2
- AWS Serverless Example HOT 1
- Dropwizard 4.0.2 + Hibernate + ContainerResponseFilter with NameBinding HOT 3
- Jersey client 2.21 doesnt support Transfer-encoding: chunked, is there any workaround?
- Breaking change in a version between 4.0.1 and 4.0.4 HOT 3
- DropwizardJettyServerAdapter in DropWizard3 causing exception when there are multiple HttpHeaders HOT 9
- Update Logback to fix CVE-2023-6378? HOT 4
- NPE in tests when a factory is used to inject a value to a resource method parameter HOT 2
- Managed virtual thread pool HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropwizard.