Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

With more than 20,000 members, join one of the biggest and most active Java Communities on Discord! ☕

Join

java-help

❓︱qotw-answers

Oauth Authorization

Can anyone suggests how can I learn about Oauth2 theory and implementation ? I am really confused about it that what to learn and what not !

how to set up endpoint for my soap webservice?

hey guys. im trying to make my own soap webservice, and im following official spring guide. and i have question about the endpoint. i have this: ```java @Endpoint public class CountryEndpoint { private static final String NAMESPACE_URI = "http://spring.io/guides/gs-producing-web-service";...

how to use xsd file?

hey guys. can smb explain how xsd files work? did i get it right? heres a fragment of my xsd file: ```xml <xs:complexType name="paymentInformation"> <xs:sequence> <xs:element name="transactionId" type="tns:transactionId"/>...

memory address search

I'm wondering whether it's possible to somehow search for a specific object instance by checking every possible (used, if that's checkable) memory address. The object wouldn't be accessible otherwise but this way (or it's stored in some unknown instance or class). Would some Unsafe magic work for that?...

Need help w Config Server (SpringBoot)!!!

I have a problem that I have a project with microserver architecture and I have a microservice config-server where accordingly I have yml files of other services. I need help with the fact that microservices can not take yml configurations from config server because of what I understand there is an error. Thanks UPD: I made a small project to demonstrate my problem....
No description

do i need to use `starter web services` dependency if i already have `starter web`?

hey guys. in my build.gradle file i have this line: implementation 'org.springframework.boot:spring-boot-starter-web' do i need to add implementation 'org.springframework.boot:spring-boot-starter-web-services'? because i want to craete soap web service, and im following a tutorial, but its not clear to me. thanks in advance fellas....

What do y'all use for frontend with spring?

Which framework/stuff do you use? i wanted to use nextjs but people told me its overkill because its already a fullstack framework

Bean Initialization Error

I am Getting this error ->```Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-07-03T11:11:21.350+05:30 ERROR 11748 --- [ restartedMain] o.s.boot.SpringApplication  : Application run failed org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'securityConfiguration': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:355) ~[spring-beans-6.1.10.jar:6.1.10]...

Ecplise Project Issue

I am getting all my projects in a parent folder that I haven't created by my self I don't know how it appears in my project directory . Can Someone Help ?
No description

Styling tabpane in javafx

does anyone know which style class does this tabpane thingy have? or atleast what is it called
No description

Saving User

Can someone help me to save the user if the user dont have any roles then put it there the USER role but i dont know how to do it .. ```package com.ShelfSpace.ShelfSpace.service; import java.util.ArrayList; import java.util.List; ...

Pushing Java Code

Can someone tell me how can i push my code to my github using Ecplise IDE ? Bcz last time when i did it myself i really got into the big problem .

DTO

Can anyone help me to create DTO for this classes and also explain me why we use DTO more ```package com.ShelfSpace.ShelfSpace.model; import java.util.List; import jakarta.persistence.Column;...

Spring Security

I wanna Config The Spring Config class but due to changemnet in version i am not able to do it . Can anyone Help ```package com.ShelfSpace.ShelfSpace.Config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity;...

Use a Class for a generic type?

is there a way to for example do
String clazz = "java.lang.String";
List<Class.forName(clazz)> list = new List<>();
String clazz = "java.lang.String";
List<Class.forName(clazz)> list = new List<>();
In case this is xy problem: I have a class called DataObject for storing some extra data on things, and it has a generic type for what type of data it's storing. There's another class called DataMap that takes its own generic type and extends DataObject with a HashMap<DataObject<T>, DataObject<?>>. I'm then serializing it to json with gson as my method of storing it in a file, but I need a custom deserializer for it, and I'm getting errors for it not being able to convert HashMap<DataObject<?>, DataObject<?>> to HashMap<DataObject<T>, DataObject<T>>. Storing the class name in the json is my current idea for a workaround....

InvocationTargetException using JCI

I try to run a simple main to compile(!) some java code. This is my pom: ```<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>...

Data Structure And Algorithms

I wanna start Data Structure And Algorithms So can anyone Suggests me a good Data Structure And Algorithms Course ?

Maven semantic versioning

Hi, I would like to implement the following semantic version ING scheme for my company in a maven parent or archetype. M.m.R.P-B M: Major Version...

JSON RESPONSE ERROR

I dont know why whenever i am adding data to my RestApi i am getting double json response of book class here is the response ->