redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.07k stars 433 forks source link

non-project file, only JDK classes are added to its build path #3693

Open 0gon opened 2 months ago

0gon commented 2 months ago

[provide a description of the issue]

Environment
Steps To Reproduce
  1. [step 1] clone project
  2. [step 2] set datasource (/redisChat/src/main/resources/application.yml) (I was using h2 in this project.)
  3. [step 3] run redisChatApplication.java

[Please attach a sample project reproducing the error] https://github.com/0gon/hung_chit_chat [Please attach logs]

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
        SpringApplication cannot be resolved

        at com.redis.redisChat.demo.RedisChatApplication.main(RedisChatApplication.java:10)
Current Results

Added two modules to practice the msa method. kafkaChat, redischat. It works fine on the pc that created the project, but I try to clone it and run it on another pc, so I can't get spring boot dependency.

Estimated results

Maybe when I clone it, I don't think I recognize the folder as a module or project, but as a simple folder.

I've looked in many directions. But I'm sorry I'm a beginner, and I don't know any more because I lack clues.

Additional Informations

sp20240707_222836_079

sp20240707_222952_816