#Java Spring boot Consider defining a bean of type
83 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @distant abyss! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Do you have a target/generated-sources or similar directory?
yes i have one that is generated every time
do you use mapstruct
for the mapper
if yes show the book mapper code
yes
did you try running mvn clean compile or gradle clean compileJava
I have done it it says build success but if i try to run the proyect i get the same issue
btw i just checked your git repository
you need to exclude the target folder from being pushed to git
try adding git ignore
is your target folder marked as excluded
has that orange color or no
is that what you mean
yes
git ignore
is the target folder marked as excluded for you
idk how that works on vsc
@twin gulch your skibidiness come check
Can you show its contents?
like the git ignore
can you show if in that generated classes folder
there is booking mapper impl
Can you show what's inside the target/generated-sources?
i asked first ezezezez
sure?
2
yea but i asked whats inside
.
doesnt count
There is a Booking mapper impl
also target/generated-classes is technically something else
idk for me it looks like the target folder shouldnt be excluded
Can you show BookMapperImpl?
Maven compiled it to target/classes
lol
how do you run the app btw
mvn clean spring-boot:run
very interesting
try running with this
mvn clean compile spring-boot:run
see if that changes anything
same thing
hmmmmmmm
run mvn clean install
without running the app
see if you get these mapper impl
in target/generated-sources/annotations
yes they are generated
any suggestions
I'd run the program with a more detailed logging level
and ideally I'd like to see the full logs
even better suggestion
how i do that
add logging.level.org.springframework.boot.web.servlet.=DEBUG to the application.properties
and share the full outputs when running the program using a codeblock, not an image
Please format your code & make it more readable.
For the java programming language, it should look like this:
```java
public class Main {
public static void main(String[] args){
System.out.println("Hello World!");
}
```
• These are backticks, not quotes.
it send like a txt idk why
that's fine
Can you try adding BookingMapperImpl something; variable in your main class? Just for testing?
And then run the project again?
Also, can you run it from VSC without using the Maven command?
You could try updating mapstruct to 1.6.3
i have change the version run it with the mvn and the vs code and still get the same error msg
i think i fixed it i updated the version of the maven to see if that was the issue and its now loading
thx for the help anyways