What is ThreadFactory? It is where we create each thread that will be used in our thread pool. The factory … More
Author: camilamacedo86
[Java] – Understanding Volatile and a little more about Threads
So imagine the following situation: Two threads with the same implementation running and you want both stop running if one … More
[Java] – How to work with a thread pool?
First we need understand some concepts. Let’s go. What is a thread pool ? It is a manager thread type … More
[Java] – How to check how many processors have available?
Below is the code for you check it : public class QtyProcessorsTest { public static void main(String[] args) { Runtime runtime = … More
[Java] – Spring and dateformatter
We will perform it in our application configuration class(AppWeb Configuration), so that we don’t need to keep repeating this date … More
[Java] – How to validate a form using validation of Spring?
Below is an example: First, look the method that we will use to save the object that the user filled … More
[Java] – Spring – How to configure a messages file ?
The file with messages will be : messages.properties Implement the method in AppWebConfiguration.class: @Bean public MessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new … More
[Java] -How to use JAX-B to parse XMLfiles ?
What is it? JAX-B is the Java specification that allows us to directly associate a class to an XML file, … More
[Java] -How to use XSLT files ?
What is it? XSLT files are files that help us to transform XML files into other formats such as html … More
[Java] – How to use XPath to parse XML files?
What is it ? The xPath allows us to select only a part of our document using a very similar … More