#Java Spring boot Consider defining a bean of type

83 messages · Page 1 of 1 (latest)

distant abyss
#

I been doing a proyect where i need to connect a jpa and mongo database with a domain but everytime i try to run the code i get the same issue I cant figure out what iam doing wrong
more context this is the proyect https://github.com/JVC0/Hotel-puerto.git

cedar badgeBOT
#

This post has been reserved for your question.

Hey @distant abyss! Please use /close or the Close Post button 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.

twin gulch
distant abyss
olive bay
#

for the mapper

#

if yes show the book mapper code

distant abyss
olive bay
#

cant open git thats why im asking

distant abyss
olive bay
# distant abyss

did you try running mvn clean compile or gradle clean compileJava

distant abyss
#

I have done it it says build success but if i try to run the proyect i get the same issue

olive bay
#

interesting

#

ill check on my code

olive bay
#

you need to exclude the target folder from being pushed to git

#

try adding git ignore

olive bay
#

has that orange color or no

distant abyss
#

is that what you mean

olive bay
#

git ignore

#

is the target folder marked as excluded for you

#

idk how that works on vsc

#

@twin gulch your skibidiness come check

twin gulch
distant abyss
#

like the git ignore

olive bay
#

there is booking mapper impl

twin gulch
#

Can you show what's inside the target/generated-sources?

olive bay
twin gulch
twin gulch
olive bay
#

yea but i asked whats inside

twin gulch
olive bay
#

doesnt count

distant abyss
#

There is a Booking mapper impl

twin gulch
#

also target/generated-classes is technically something else

olive bay
#

idk for me it looks like the target folder shouldnt be excluded

distant abyss
olive bay
#

maybe vsc went crazy

#

and doesnt recognize it

twin gulch
twin gulch
olive bay
#

lol

distant abyss
#

Thats the one in the target file

olive bay
distant abyss
#

mvn clean spring-boot:run

olive bay
#

very interesting

olive bay
#
mvn clean compile spring-boot:run
#

see if that changes anything

distant abyss
#

same thing

olive bay
#

hmmmmmmm

olive bay
#

without running the app

#

see if you get these mapper impl

#

in target/generated-sources/annotations

distant abyss
#

yes they are generated

olive bay
twin gulch
olive bay
#

great suggestion

#

@distant abyss try that

twin gulch
#

and ideally I'd like to see the full logs

olive bay
#

even better suggestion

distant abyss
#

how i do that

twin gulch
#

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

cedar badgeBOT
#

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.

distant abyss
twin gulch
#

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?

distant abyss
twin gulch
#

You could try updating mapstruct to 1.6.3

distant abyss
#

i have change the version run it with the mvn and the vs code and still get the same error msg

distant abyss
#

thx for the help anyways