Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!

Join

java-help

❓︱qotw-answers

Spring boot upload files with multiple parameter

How do i upload file with multiple parameter in spring boot in submit form Thanks in advance...

Why and when we should use package-private in hexagonal architecture?

Hello everyone, I come with a question because I am learning hexagonal architecture when, how and why do we use package-private in this architecture I would like someone to explain it to me in plain English or maybe someone knows a good tutorial on YouTube? Thanks in advance!

Use BBModel's in spigot plugin

Im tring to create a vehicles plugin that supports bbmodel' s, for the actual model, animations and hitboxes, but i can't find much online on how to do it. I've written all the models to convert the actual .bbmodel json to java objects, but now i don't know how to actually proceed with the entity generation and that kind of stuff.

Help

What is 5+5-2

HikariCP question

I set the spring.datasource.hikari.maximum-pool-size=30 but it defaults to 10. It works fine locally but not when application is deployed which is odd. Any debugging tips here on why it defaults to 10 instead of overriding this to the value I set?

help

Input two unequal numbers. Display the number after swapping (interchanging) the values of variables without taking any extra variable Eg: a=14, b=25 will be updated as a=25 , b=14...

Helpppp

Input two unequal numbers. Display the number after swapping (interchanging) the values of variables without taking any extra variable Eg: a=14, b=25 will be updated as a=25 , b=14...

switching between fxml and css files

I'm learning Java FX and would like to ask if it's a good idea to create an FXML file and a controller class for each interface. If so, how can I switch bewteen the fxml and css files. Please explain this method in detail and the JDK classes we need to use it.

Access denied for DB user in Spring Boot tests

I am trying to perform integration tests with Spring Boot, JUnit, and Mockito. When I run the tests, I get a bunch of exceptions, but it frequently mentions: Access denied for user 'latte_test'@'localhost' (using password: YES) or similar. In application-test.yml, I have set the database credentials as environment variables. In IntelliJ IDEA Community, I have set their correct values in each test execution configuration (Run > Edit configurations for the test class and its @Test method). In MariaDB, I have granted the necessary permissions to the user for the database in question. Outside of the tests (in the main package), everything works correctly; it connects to the database by setting the values of the environment variables in Run > Edit configurations. /test/resources/application-test.yml ```yml...

async programming in scala, are futures the standard now?

```scala package com.xxx.dataplatform.grpc import akka.Done import akka.actor.typed.ActorSystem...

Using Spring Data Criteria Builder to create a dynamic query that includes a UNION

I am currently having a problem where I need to dynamically build a query in Spring based on parameters being passed for a multicriteria search. The problem comes from the fact that I can't seem to find any way to do a union and include pagination in the select. What I want is something along the lines of the following SQL ``` WITH UNITED AS (...

secure my auth with being able to acces swagger

// @Override // protected boolean shouldNotFilter(HttpServletRequest request) { // return PUBLIC_URLS.stream().anyMatch(m -> m.matches(request)); // } ...

can t find swagger

trying to use swagger but it doesn t work

Do You Manually Write Filtering/Sorting for Each API or Use a Generic Solution?

In most applications (99.9% of them), we typically have a listing API for resources that supports filtering, sorting, and searching. From what I’ve seen, developers usually write custom query logic or conditions for each of these operations manually, per resource. However, I find this to be repetitive and somewhat labor-intensive across multiple projects....

How to share profiles, env variables, etc across different tests?

I'm want to learn integration tests for my Spring Boot project, with JUnit and Mokito. I'm basically I want a integration test class for each one of my domain entities, it has its respective layers (controller, service, repository, etc.) In tests I want to separate with classes for test for each entity, but all of them share the "test" profile from my application-test.yml and I would an unique execution point to no need to set the env variables for each executable test, in this case with Intel...

Mod Project

I need help. I want to develope a Minecraft Mod but i don’t have any experience with that. Can anyone show me how to do that for free? Thanks. By the way i am from germany if there are some german here....

try { this.invokeInitMethods(beanName, wrappedBean, mbd); } catch (Throwable ex

When does this exception occurs in the application ? Also When does this exception occurs ? try {...

Don't work import jakarta.validation.constraints.NotBlank;

Hi, i'm a student and actually i'm using Spring, but when i using @NotNull or @NotBlank didn't work i put the library for example: jakarta.validation.constraints.NotBlank; & jakarta.validation.constraints.NotNull; I'm also using Maven and in the post you can see the dependecies. Thank you, if you help me...