Skip to content
Advertisement

Tag: java

Send a simple POST request from Quarkus/Java

I want to send a simple POST request to another application to trigger some action there. I have a quarkus project and want to send the request from inside my CreateEntryHandler – is this possible in a simple way? Or do I need to add something like Apache Httpclient to my project? Does it make sense in combination with quarkus?

@AliasFor doesn’t work on attribute in custom annotation

I’m using SpringBoot 2.4.2. And I’m struggling with @AliasFor with custom annotation. I implemented below custom annotation. And using it like this. And this test code fails. with message I don’t know why, anyone know? Answer An annotation is static metadata for a class, field etc. so Spring cannot change anything about it. To make features as @AliasFor possible Spring

Recursion Showing Adjacent Blank Mines in Minesweeper

I am fairly new to Java and I have been working on a Minesweeper game. I am trying to get the adjacent cells to be revealed recursively when an empty cell is clicked. I do this by calling showCell() shown below: Cells array declaration and population: toggleFlag() showCell() The problem I am having is when I hit this portion of

Read a text file to create a 2D Array in Java

I have a text file with first line will be the size of the board and the remaining values will be the values of p row by row. All values are separated by whitespace. For example: 5 2 5 10 3 5 4 6 9 12 3 11 5 9 7 7 7 2 4 8 19 2 6 8

Why is my image not being added? JavaSwing

I made this program, assume I have an extra src folder in my buildpath with the monkiflipppp.gif there. It just runs and has a button, but the button won’t actually do anything… Not sure if I need …

Log4j2 how to overwrite path in configuration log4j2.xml?

I have to save the logs to the path taken from the database. I know the logs start earlier. For this, in xml I have a path configuration, but I want the path to be overwritten after downloading data from the database. Log4j2.xml Answer Take a look at Programmatic Configuration… My suggestion would have no Log4j2.xml logging, just add a

Advertisement