Category "java"

Spring AOP with Around advice and @annotation not working

I am using Spring AOP for logging in my application. Here is the applicationContext.xml file <mvc:annotation-driven /> <context:component-scan base-

unable to install playwright as a maven dependancy

I'm trying to build my automation framework using playwright with java, however I'm running into below issue when running the tests. Please advice! Failed to in

@CucumberOptions in cucumber-junit-platform-engine

I'm trying to migrate my cucumber tests from cucumber-junit to cucumber-junit-platform-engine to be able to use new platform features. How do I redefine my runn

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException

Run my Spring Boot application (sample program to post jason to Spring RESTful webservice) in Eclipse successfully. However, when I use the mvn package command

Grid layout manager with dynamic item

I use grid layout manager but not working good for dynamic item What I want: or just like And What it shows:

how to manage the timezone which are not directly supported in java

we are getting the ZoneId object by passing the id string -> ZoneId.of("US/Alaska") While getting the timezone ids from java after passing the location name,

Libgdx Installation gdx-setup.jar file missing

So I have watched several videos and read through many a forum post on installing libgdx with android development studio. Every time someone opens the gdx-set

Authentication Principal is empty while using Spring Session Redis

I am building rest API using Spring Boot v1.3.3. API is secured by Spring Security. I have implemented custom user details service to have custom principal in a

Billing service unavailable on device. (response: 3:Billing Unavailable)

I've been struggling with this problem for days now. I know there are a lot of questions with the same problem on SO but i couldn't get it to work. What I have

How to get coordinate of text from line paragraph pdf itext5

How to get coordinate of left of line text paragraph pdf. I mean like pic (x,y). Coordinate per line. I use itext5 and java

How to tell what action was taken by the JPA save method

I have a repo: public interface SomeRepository extends CrudRepository<SomeClass, Long> { SomeClass findById(Long id); } and I need to save objects

Spring security - Disable logout redirect

I'm using spring security with REST, and I'm using the URL (/logout) as an endpoint for my logout method. But after calling this method, it redirect me to (/log

java codility Frog-River-One

I have been trying to solve a Java exercise on a Codility web page. Below is the link to the mentioned exercise and my solution. https://codility.com/demo/res

How to get day,month,year from String date?

I have a date on String, like this: String date="25.07.2007"; And I want to divide it to: String day; String month; String year; What is the best way to do

How to find/remove unused dependencies in Gradle

I wanted to find unused dependencies in my project. Is there a feature for this in Gradle, like in Maven?

Android transition animation does not work in API below 26

I tried to create a profile preference like WhatsApp where the profile photo is shared with the profile activity. I used the following code which works properly

How do I use the new computeIfAbsent function?

I very much want to use Map.computeIfAbsent but it has been too long since lambdas in undergrad. Almost directly from the docs: it gives an example of the ol

Eclipse does not start when I run the exe?

When I run the Eclipse.exe within the given folder, it will not start. The Eclipse splash screen will appear for a split second then close. There are no errors.

What does mean by recoverable and un-recoverable exception or error

I'm trying to understand difference between error and exception but it looks same thing and on Oracle Official tutorials I read this line. Checked exceptio

How to use add() in ArrayList class in Java

I have a question about constructing an ArrayList, I have had a Car Class, now I need to make an ArrayList to put content in, I named it as Race, please see cod