Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I currently have a Java Spring Rest API that enables images base64 to be uploaded to my server. Now I would like to know if there is a way I can limit the upload size so that people wont be able to upload 1GB and crash my server.
For those using Spring Boot, consider setting the following parameters in your application.properties (or application.yml) file:
multipart.max-file-size=1Mb
multipart.max-request-size=10Mb
See Common application properties.
I believe it should be configured on the web server level and not on the code level. For example in tomcat you can configure maxPostSize param present in server.xml to limit the size of Http POST request.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 10 months ago.
This post was edited and submitted for review 10 months ago and failed to reopen the post:
Opinion-based Update the question so it can be answered with facts and citations by editing this post.
Improve this question
I am working on a spring boot application, Which dependent library to use just to consume and push data to database.
spring-kafka or spring-cloud-stream-binder-kafka
Depends what you need to do.
If you want to move data between topics in the same Kafka cluster, and want to use Kafka Streams Topologies, then you can use the Spring Cloud Stream binder.
That being said, spring-cloud-stream-binder-kafka doesn't have a producer (KafkaTemplate), that comes directly from spring-kafka, so if the goal is only to create a basic producer or topic-listener, then you only should need spring-kafka
Spring cloud stream is built on top of spring kafka.
If you want to integrate with external messaging systems then you should go with spring-cloud-stream-binder-kafka. You can also refer this link.
But if you don't want such integrations and just need good performance then you should go with spring-kafka.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a web app that uses a PHP backend. The server gets requests and sends back data in json. In that sense its a simple REST server.
I want to reimplement the server in Java. What technology/framework should I use. More like, how will an enterprise solution look like?
The question is of poor quality. You can get this by simple google search
Spring (Spring Boot: Latest light weight one of spring)
Struts
Play
SparkJava
Dropwizard
And so on are popular java frameworks... Each has its own advantage. Where spring is the strongest and vast one. I would suggest Spring if its a heavy application. Else you can go for any of them.
See this
All of them are REST supported
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm playing with writing a Java-capable webserver. How do you get from your WAR/JSP to executable Java code? I've figured at this point FCGI is not available(I do have a client impl). What kind of mechanisms or specs are here? Are there any standards?
Please refer the spec http://www.oracle.com/technetwork/java/javaee/tech/index-jsp-142185.html
To brief you about the invocation when a war is deployed in the web server,the server refers the web.xml files for important configuration and then finds out the information regarding your webapp.All the configuration is loaded.If you try to hit an url mapped to a servlet then the class corresponding to it gets loaded.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am working on an embedded device which has Android OS on it, Its not a smartphone. I need to write a webserver in android for which I am using iJetty. I am planning to have service expose as REST webservice. For this I am looking at light weight REST server framework that I can use inside by apk file.
I did some research and found Restlets for Android
Do you know of any good light weight REST server framework that you would like to recommend?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a framework/solution for authentication/ user-login management/ security in java web application that can make the naive developer's job easier/faster and make the application relatively more secured against potential threats.
P.S. : I'm using JSF 2.0 as the front-end development framework in my web application.
Spring Security is a reasonable choice.
Consider using Apache Shiro.
You can take a look at their tutorial.