For example, this one will exclude 1 file. But how to exclude all file under a directory? like: org/apache/commons/codec/language/bm/ folder? . does not work 🙂 Answer wild card can be used to enforce action to multiple file in directory. See this:- You can also exclude a file/directory with out specifying the…
JavaFX Get ComboBox from ChoiceDialog
I have a javafx.scene.control.ChoiceDialog object in my JavaFX project. When the dialog opens, I want to set the focus to the underlying ComboBox. However, I can’t figure out how to get the underlying ComboBox control. With a TextInputDialog, there is a method called getEditor(). Is there any way (other…
Mockito: mocking objects and adding to ArrayList
I am testing an enterprise level application using Mockito and JUnit. Here is the code for a method of adding a product to the offline repository class in a product offline-repository-class-test I have: This relies on the following methods in classes: The method it is testing in the ProductRepositoryOffline: …
java.lang.IllegalArgumentException: Result Maps collection already contains value for
Hey I’m using Mybatis with Spring Annotations. and getting this error: here is the domain class (sans getters and setters): here is my Mapper.Java class lastly here is the Mapper.xml I’m inclined to believe there is something wrong with the xml select statement. Probably with how I am using foreac…
How to use decorated method in Mapstruct collection mapper?
I am using MapStruct to map from a JPA entity to a POJO DTO, in a Spring app with dependency injection. I have added some additional processing of the DTO to a method in a decorator as specified in the doc. It works fine for mapping a single entity. But I also have a mapping for a collection (set) of
Are static variables inherited
I have read at 1000’s of locations that Static variables are not inherited. But then how this code works fine? Parent.java Child.java This code prints “Parent”. Also read at few locations concept of data hiding. Parent.java Child.java Now the output is “Child”. So does this mean …
Jboss (6.4 EAP) to WebSphere (7.x)
I am attempting to make a EJB call from Jboss (6.4 EAP) to WebSphere (7.x). I have a working example from WebSphere (WAS) to WAS, however, the same location and lookup name returns a name not found exception. I’m currently doing this testing inside of a web application deployed as a WAR into Jboss. I do…
Change the port of a Spring boot application without changing the code
I have two applications that I need to run simultaneously, and both are trying to run on port 8080. I’d like to change one of them to port 9000. The application I’m trying to change has spring security, so it runs on port 8443 when using https and port 8080 when using http. I have to move it from …
spring-boot – turn off console logging
Want to configure a spring-boot (1.3.5) application to send log-output only to a file — turn off the console. It looks very easy, according to the docs: howto-logging.html — section § 72.1.1 Configure logback for file only output But I just cannot get this to work — it still logs both to fil…
java.lang.ClassNotFoundException: org.eclipse.jetty.Server
I am trying to run a maven project when I run mvn install everything is ok I got build success qnd when I tried to lunch the project I got the following exception: and when I run mvn dependency:tree I got the following results: and this is my pom.xml file : so any idea how to fix this problem !!!!