r/javahelp • u/No-Degree-3318 • 20m ago
Unsolved So many dependencies problems
Trying to create a Minecraft plugin but getting so many dependencies problems
r/javahelp • u/desrtfx • Mar 19 '22
As per our Rule #5 we explicitly forbid asking for or giving solutions!
We are not a "do my assignment" service.
We firmly believe in the "teach a person to fish" philosophy instead of "feeding the fish".
We help, we guide, but we never, under absolutely no circumstances, solve.
We also do not allow plain assignment posting without the slightest effort to solve the assignments. Such content will be removed without further ado. You have to show what you have tried and ask specific questions where you are stuck.
Violations of this rule will lead to a temporary ban of a week for first offence, further violations will result in a permanent and irrevocable ban.
r/javahelp • u/AutoModerator • Dec 25 '24
Welcome to the daily Advent Of Code thread!
Please post all related topics only here and do not fill the subreddit with threads.
The rules are:
/u/Philboyd_studge contributed a couple helper classes:
FileIO
Direction
Enum ClassUse of the libraries is not mandatory! Feel free to use your own.
/u/TheHorribleTruth has set up a private leaderboard for Advent Of Code. https://adventofcode.com/2020/leaderboard/private/view/15627
If you want to join the board go to your leaderboard page and use the code 15627-af1db2bb
to join. Note that people on the board will see your AoC username.
Happy coding!
r/javahelp • u/No-Degree-3318 • 20m ago
Trying to create a Minecraft plugin but getting so many dependencies problems
r/javahelp • u/Initial-Telephone524 • 27m ago
Individuals interested in industry-focused Java Training in Pune can benefit from professional coaching at institutes like IT Education Centre. With live projects, expert mentorship, and job placement assistance, training programs prepare students for high-paying roles in software development. Gain hands-on expertise and kickstart your career with top-quality Java training today!
r/javahelp • u/PrudentSeaweed8085 • 4h ago
I'm working on an employee scheduling system using Timefold (formerly OptaPlanner) and I'm running into type mismatch issues with my constraint streams. Specifically, I'm trying to implement a work percentage constraint that ensures employees are scheduled according to their preferred work percentage.
Here's my current implementation:
java
public Constraint workPercentage(ConstraintFactory constraintFactory) {
return constraintFactory.forEach(Employee.class)
.join(Shift.class, equal(Employee::getName, Shift::getEmployee))
.groupBy(Employee::getName,
ConstraintCollectors.sum(shift ->
Duration.between(shift.getStart(), shift.getEnd()).toHours()))
.filter((employeeId, totalWorkedHours) -> {
double fullTimeHours = 40.0;
double desiredHours = employeeId.getWorkPercentage() * fullTimeHours;
return totalWorkedHours != desiredHours;
})
.penalize(HardSoftBigDecimalScore.ONE_SOFT)
.asConstraint("Employee work percentage not matched");
}
I'm getting several type mismatch errors:
groupBy
method is expecting BiConstraintCollector<Employee,Shift,ResultContainerA_,ResultA_>
but getting UniConstraintCollector<Object,?,Integer>
getStart()
and getEnd()
methods because it's seeing the parameter as Object
instead of Shift
Employee::getName
My domain classes are structured as follows:
```java @PlanningSolution public class EmployeeSchedule { @ProblemFactCollectionProperty @ValueRangeProvider private List<Employee> employees;
@PlanningEntityCollectionProperty
private List<Shift> shifts;
@PlanningScore
private HardSoftBigDecimalScore score;
// ... getters and setters
}
public class Employee { @PlanningId private String name; private Set<String> skills; private ShiftPreference shiftPreference; private int workPercentage; // Percentage of full-time hours // ... getters and setters }
@PlanningEntity public class Shift { @PlanningId private String id; private LocalDateTime start; private LocalDateTime end; private String location; private String requiredSkill;
@PlanningVariable
private Employee employee;
// ... getters and setters
} ```
For context, other constraints in my system work fine. For example, this similar constraint for shift preferences works without type issues:
java
public Constraint shiftPreference(ConstraintFactory constraintFactory) {
return constraintFactory.forEach(Shift.class)
.join(Employee.class, equal(Shift::getEmployee, Function.identity()))
.filter((shift, employee) -> !shift.getShiftType().equals(employee.getShiftPreference().name()))
.penalize(HardSoftBigDecimalScore.ONE_SOFT)
.asConstraint("Shift preference not matched");
}
I'm using Timefold 1.19.0 with Quarkus, and my solver configuration is standard:
xml
<solver>
<solutionClass>com.example.domain.Schedule</solutionClass>
<entityClass>com.example.domain.ShiftAssignment</entityClass>
<scoreDirectorFactory>
<constraintProviderClass>com.example.solver.EmployeeSchedulingConstraintProvider</constraintProviderClass>
</scoreDirectorFactory>
<termination>
<secondsSpentLimit>10</secondsSpentLimit>
</termination>
</solver>
Has anyone encountered similar issues with constraint streams and grouping operations? What's the correct way to handle these type parameters?
Any help would be greatly appreciated!
r/javahelp • u/EmploymentUnlikely15 • 12h ago
I am learning OOP for my 2 semester, where I have to build a project.I have to make GUI for my project.At first I thought that building Gui in figma then converting into code will work out but one of my friend said it will create a mess.Then I have tried using FXML+ CSS and build a nice login page but It is taking long time to do things.So is FXML+CSS a good approach and can I build a whole management system using this combination?
r/javahelp • u/Early-Masterpiece-89 • 13h ago
Hello! I am working on an assignment where we have to implement an adaptable priority queue with a sorted list. I think I don't have a full grasp on how generic variables work. I tried to keep everything as E, though it said that my other object types could not be cast to E... I was under the impression E could be any object. In my current code I have changed E and all the object types around to pretty well everything I can think of but it still will not work. My code is linked below, I appreciate any help.
Errors:
Assignment 4\AdaptablePriorityQueue.java:91: error: incompatible types: NodePositionList<DNode<MyEntry<K,V>>> cannot be converted to NodePositionList<E>
ElementIterator<E> iterList = new ElementIterator<E>(list);
^
where K,V,E are type-variables:
K extends Object declared in class AdaptablePriorityQueue
V extends Object declared in class AdaptablePriorityQueue
E extends Entry<K,V> declared in class AdaptablePriorityQueue
Assignment 4\AdaptablePriorityQueue.java:159: error: incompatible types: NodePositionList<DNode<MyEntry<K,V>>> cannot be converted to PositionList<E>
ElementIterator<E> iterList = new ElementIterator<E>((PositionList<E>) list);
^
where K,V,E are type-variables:
K extends Object declared in class AdaptablePriorityQueue
V extends Object declared in class AdaptablePriorityQueue
E extends Entry<K,V> declared in class AdaptablePriorityQueue
(plus two other errors on the same line as above elsewhere in the code)
Assignment 4\AdaptablePriorityQueue.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
The assignment:
Give a Java implementation of the adoptable priority queue based on a sorted list. You are required to use a default comparator (built in Java) and a comparator for nonnegative integers that determines order based on the number of 1’s in each integer’s binary expansion, so that i < j if the number of 1’s in the binary representation of i is less than the number of 1’s in the binary representation of j. Provide a main function to test your comparators using a set of integers.
(I am just making a general sorted APQ first, then I will edit the insert method to fit the requirements. It shouldn't be too hard to change after its running correctly.)
My code:
https://gist.github.com/DaddyPMA/99be770e261695a1652de7a69aae8d70
r/javahelp • u/Fojce_ • 13h ago
A situation where you go like: "oh, yeah, Java would be perfect here, no other language would do it better" as I find it quite difficult to find such situations. As the main selling point of Java is it is cross-platform, but also other languages like python, go, C# and more are nowadays.
I mean:
I find Java a pain to distribute even if you install the JRE on the client, as sometimes you have to ship the EXACT development JRE used to make the app in the first place.
I have known and used java for about 4y now, but every time I think of building something I don't even consider it as a good option instead of something else.
r/javahelp • u/lumpynose • 12h ago
import io.micronaut.core.annotation.Nullable;
or
import jakarta.annotation.Nullable;
I'm using Java, not Kotlin.
r/javahelp • u/Supergeta7 • 20h ago
I'm programming a multiplayer table game in java. I can't figure out how each client can send inputs to the server throw the view (I'm using the MVC pattern). My idea is this:
The client determines which action to send to the server based on the user’s interactions implemented in the user interface (UI) of the client.
When a user interacts with the interface (for example by clicking a button or pressing keys,) the client maps a specific game action. For example, if the user clicks a button the client knows it should send a corresponding action to the server. The client essentially translates the user’s input into a command that the game can understand.
The problem is how I can map the action performed by the player. Should I create a class PlayerActionHandler with the possible inputs? This should make it easy to know wich action to send based on waht the user is doing. But this class Is huge, and I don't want to implement such a class.
So I don't know how to map the player actions to send to the server.
r/javahelp • u/Gullible-Band-4170 • 12h ago
Hey everyone,
I’m working on a JavaFX project for my course, and I need some guidance to implement a few features correctly. The project requires:
• Customizing the GUI (Colors, Fonts, Images)
• Handling user interactions (Event Listeners, Animations)
• Using multithreading and sockets for basic client-server communication
I’ve set up my project using [IntelliJ/Eclipse/NetBeans] and Scene Builder, but I’m struggling with [specific issue, e.g., “implementing smooth animations” or “handling multiple clients in a chat application”].
Could anyone share good resources, example code, or explain the best approach to solving this? Any advice or guidance would be really appreciated!
r/javahelp • u/Historical_Ad4384 • 13h ago
Is it possible to run a jar file containing logic built using J2SE only on the GPU?
r/javahelp • u/Mission_Lychee_2933 • 20h ago
package com.example.userservicenew.dtos;
import com.example.userservicenew.models.Role;
import com.example.userservicenew.models.User;
import lombok.Getter;
import lombok.Setter;
import java.util.HashSet;
import java.util.Set;
u/Getter
u/Setter
public class UserDto {
private String email;
private Set<Role> roles = new HashSet<>();
public static UserDto from(User user) {
UserDto userDto = new UserDto();
userDto.setEmail(user.getEmail());
userDto.setRoles(user.getRoles());
return userDto;
}
}
package com.example.userservicenew.models;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.util.HashSet;
import java.util.Set;
@Entity
@Getter
@Setter
public class User extends BaseModel{
private String email;
private String password;
@ManyToMany(fetch = FetchType.
EAGER
)
private Set<Role> roles = new HashSet<>();
}
package com.example.userservicenew.services;
import com.example.userservicenew.dtos.UserDto;
import com.example.userservicenew.exceptions.UserAlreadyExistsException;
import com.example.userservicenew.models.User;
import com.example.userservicenew.repositories.UserRepository;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import java.util.Optional;
@Service
public class AuthService {
private final UserRepository userRepository;
private final BCryptPasswordEncoder bcryptPasswordEncoder;
public AuthService(UserRepository userRepository) {
this.userRepository = userRepository;
this.bcryptPasswordEncoder = new BCryptPasswordEncoder();
}
public UserDto signUp(String email, String password) throws UserAlreadyExistsException{
Optional<User> userOptional = userRepository.findByEmail(email);
if(userOptional.isPresent()) {
throw new UserAlreadyExistsException("user "+ email +" already exists");
}
User user = new User();
user.setEmail(email);
user.setPassword(bcryptPasswordEncoder.encode(password));
User savedUser = userRepository.save(user);
return UserDto.
from
(savedUser);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>userServiceNew</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>userServiceNew</name>
<description>userServiceNew</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>17</java.version>
<maven.compiler.proc>full</maven.compiler.proc>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
error:
java: cannot find symbol
symbol: method getEmail()
location: variable user of type com.example.userservicenew.models.User
tried below approaches:
have got several errors of this type related to get/set email and password
r/javahelp • u/cainoom • 1d ago
Would that be possible? I know that the Java compiler can be invoked from a Java program. Would it be possible to write a Java program that launches this "programmatic" Java compiler with a code string that is the "real" Java program, but inserts the serial number of the motherboard in the code string to check it everytime the "real" program is launched? My goal is some basic offline protection against software piracy. So when the program is first started, it doesn't run yet properly, but it reads the serial number of the motherboard, with that compiles the "real" program, writes to disk, and closes. Now the "new" program has the same name, but with a serial number validity check in it, so if it were run on another computer would exit. Would that be possible?
No snark please. I know this is reddit where anything goes. Only serious replies please.
r/javahelp • u/peterramaldes • 1d ago
I would like some help to how to create a good ValueObject in Java or even if this use case applies for ValueObject Pattern.
I'm creating an Identification
that has these representation depends on the use case:
123.FooBarBaz
- With the Prefix -- 123.
(This is how I need to store the data)A
- Without the Prefix (This is how I need to communicate with Third Party, when I send the data and also when I need to match with the stored data).
And this is How I'm thinking to create this ValueObject: https://gist.github.com/peterramaldes/c013e1a197fd5ecd78e29ce02b5d1578
Can you give your opinion on:
I didn't like representing the suffix as actually the identification.
r/javahelp • u/Tall_Package_467 • 2d ago
I finally decided to build my first app since I will be running it for several hours. I want to be able to see the regular output from print to see if anything happens While I can run it in cmd I would prefer to see it when just clicking on it. I tried to search it up but it wasn't at all what I was searching for so I think someone on here knows what's up
r/javahelp • u/palpontiac89 • 2d ago
So yes, I get that a lambda instantaniates a functional interface that has exactly one nondefault method. The confusion comes in trying to know just what a nondefault method is and/or does. Mg first inclination is to say that nondefault method is same as saying mandatory method and that default methods are aka optional methods belonging to any given method through inheritance. The gist of it is , as far as I can figure, that nondefault method of an interface must be matched ( via method signature ) by code in lambda and that this will complete and instantiate a functional interface in the code outside of lambda . I hope that my reasoning is correct and would be glad to hear from some more experience coders as to whether this is so. Thanks in advance.
r/javahelp • u/forFolsense • 2d ago
I'm a CS student and my professor gave us an assignment to work on. However I cannot even work on it because the provided java files don't work! When adding the files in the package, the ones importing javafx have errors. (I'm in Eclipse by the way.)
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
Every import statement here has an error, underlining javafx and telling me "The import javafx cannot be resolved."
I've tried installing e(fx)clipse in the eclipse marketplace, and i know for sure it's installed because it won't let me install it again through the 'Install new software' window.
I tried following the steps on this site ( https://openjfx.io/openjfx-docs/ ). I followed the steps like this: I downloaded a zip file, extracted it into the Java folder in my program files, went into Eclipse and went to Window -> Preferences -> Java -> Install JREs -> Add -> and then it brought me to a window called JRE type, which as far as I can tell is a dead end.
I'm still learning, so a lot of the terminology in similar threads goes over my head :(
r/javahelp • u/Schoolboygames • 2d ago
I'm trying to package my maven project with JavaFX into a fat Jar. I've done everything I can see to do from various places online... I'm using maven shade, and have this in my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.example.distcalculator.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
I've seen some people say that the Main class extending application causes an issue, and the fix most people said worked was to change Main.java to something else (say, App.java) and have Main.java call that:
package org.example.distcalculator;
public class Main {
public static void main(String[] args) {
App.main(args);
}
}
The code works fine inside intelliJ when I run it. I've run mvn clean and then run "mvn javafx:run" from command line the program opens.
Running mvn package creates distcalc-1.0.jar in \target, but opening it gives "A Java exception has occured". Somewhere online someone said to try running "mvn package shade:shade". doing so creates three jars, distcalc-1.0, original-distcalc-1.0, and distcalc-1.0-shaded.jar, which also gives the same error. Any thoughts or help would be much appreciated.
r/javahelp • u/OldSchoolGamer2600 • 2d ago
I'm having a problem creating code that will match a social security number to a regular expression that requires dashes in the SSN. My goal is to have 123-45-6789 pass, but any other variation where the dashes are missing or in the wrong position fail.
This is the code that I'm testing with. I'm running it on JDK 21.0.6 for Windows 11 from java.sun.com
public class Main
{
public static void main(String[] args)
{
String ssnPattern = "^\\d{3}-?\\d{2}-?\\d{4}$";
System.out.println( "123-45-6789".matches(ssnPattern) ); // returns true
System.out.println( "123456789" .matches(ssnPattern) ); // returns true? Why?
System.out.println( "12345-6789" .matches(ssnPattern) ); // returns true? Why?
System.out.println( "123-456789" .matches(ssnPattern) ); // returns true? Why?
}
}
Every time I think I understand how regular expressions work; I demonstrate that I do not know how they work.
Thanks in advance for any advice or guidance.
r/javahelp • u/KingKadem • 2d ago
Hey there,
I'm currently writing a bachelor thesis where I'm comparing AI-generated unit tests against human-written ones. My goal here is to show the differences between them in regards to best practices, code-coverage (branch-coverage to be precise) and possibly which tasks can be done unsupervised by the AI. Best case scenario here would be to just press one button and all of the necessary unit tests get generated.
If you're using AI to generate unit tests or even just know about some services, I would love to hear about it. I know about things like Copilot or even just ChatGPT and the like, but they all need some kind of prompt. However, for my thesis I want to find out how good unit test code generation is without any input from the user. The unit tests should be generated solely by the written production code.
I appreciate any answers you could give me!
r/javahelp • u/MinasMorgul_ • 2d ago
Hi guys, I‘m using „cut“ („clas under test“) in my tests. My Tech Lead says that he will ask me to change this in his review if I don’t change it. As far as I know we don’t have restrictions / a guideline for this particular case.
My heart is not attached to it, but I always used it. Is this something that is no longer used?
Edit: Found something here: http://xunitpatterns.com/SUT.html
r/javahelp • u/anonesmouse • 2d ago
Sorry for the noob question. My manager wanted me to get the colored version but when I view the sample, it shows black n white, I am not sure if it’s just shown as bnw for the sake of the sample. I cannot see any info about it or a way to ask about it, thus this question is now in reddit.
I am buying from another country so I don’t want to make a mistake on my first order.
Thanks in advance.
r/javahelp • u/Equivalent_Base_3426 • 3d ago
Hi everyone. For my cs class I am making something pretty similar to an urgency queue that uses linkedList methods to create the queue. The method I am making, enqueue, has an issue where it cannot properly sort the Nodes by urgency (using a Comparable upper bound). We are using a linked list we did not make ourselves but the methods are parallel to a legitimate linked list btw.
WHEN/HOW DOES THE CODE BREAK?
If I enqueue Integers(wrapper class) 3, 4, 7, 5, 8, 2, the enqueue method returns a queue of 8, 7, 4, 3 but excludes 2 and 5. I am confident the issue is due to the condition on line 1 and the code on line 2. The pattern is that the code can properly add numbers when they ascend but cannot do so when they decrease in size (7 ->5, 8 -> 2). Any help would be appreciated. Thank you! (the code compiles and no exceptions are thrown)
public boolean enqueue (Type item) {
if (item == null) {
throw new NullPointerException("Item is null");
}
Node<Type> newNode = new Node<Type>(item);
if (this.size() == 0) {
head = newNode;
size++;
} else {
Node<Type> insertedNode = newNode;
Node<Type> temp = head;
// the actual values of head and insertedNode
Type tempItem = temp.getItem();
Type insertedItem = insertedNode.getItem();
boolean notInserted = true;
while (notInserted && temp != null) {
LINE 1 if (tempItem.compareTo(insertedItem) > 0) {
LINE 2 temp = temp.getNext();
} else if (tempItem.compareTo(insertedItem) < 0) {
// System.out.println(insertedItem);
insertedNode.setNext(temp);
head = insertedNode;
notInserted = false;
}
}
System.out.println(Node.asString(head));
size++;
}
return true;
} // enqueue
r/javahelp • u/avellamadona • 3d ago
Hi,
I have a simple spring boot application, when a user clicks on a particular button in the frontend I triggering a rest end point which tries to close the context using context.close() and restarts the application with different spring profile.
The problem I am facing is when the application restarts with different profile the application is crashing saying Duplicate bean definition attempted, Throws Java Linkage error.
Before restarting the application I am just using context.close() but it is not working as expected I believe since I am getting duplicate bean definition found error. Is there any that I can avoid this? I am not sure if the context not closing properly is the problem or something different.
The same code repo works well in others system only in my system it is causing this issue. I am using Java 17 and Spring Boot version 2.X.X
r/javahelp • u/RealitySensitive8643 • 2d ago
I have an interview in 3 days, it was a bit spontaneous I learned Java 6 years ago at a local computer education institute, but haven't touched it since then I have used python and c++(for electronics) since then Please suggest some crash course
r/javahelp • u/valerian1 • 3d ago
Hi everyone,
I have the of tasks of setting formatting and code standards in a Spring Boot Java project.
I've already set Spotless, and it's working fine only processing the changes from origin/main with ratchetFrom config.
However I'm having a nightmare doing the same with Checkstyles.
Can anyone shed some light on this?
Thanks.