Class is never used, although it is used

Answered

Hi there, I'm trying to create a controller directory under my project but when I right click and chose "new", there is no option "directory" there. I have to go all the way up to the "main" directory in order to get this option. Why is it not possible to create a new directory? For plugins I use Maven and GIT.

 

cheers!

1
8 comments

Hi. For Java projects, you need to create a package instead.

0

Thanks Petr! :-)

I made a package instead and now I get a message saying that class "UploadController" is never used. After running the code, I know that the method "upload" in this class is run. What could be wrong?

Cheers!

0

It is hard to tell without looking at the code, could you please provide a project source?

0

Sure, the source code is here:

https://github.com/bjornart/spring-boot-file-upload/

 

The method inside the UploadController class runs when starting mvp spring-boot:run but IntelliJ says that the class is never used.

0

Does it help if you remove .idea folder and reimport the project?

0

Hi again Petr - sorry for the late reply. Thanks for your suggestion. I tried to remove the .idea folder and reimported the project but it still says that the class is never used although when I run the code I know that the methods inside the class is run.

 

Is this a bug with IntelliJ itself?

0

Hi, unfortunately, I was not able to reproduce the problem, could you please provide idea.log (Help | Show log...), after restarting the IDE.

0

Please sign in to leave a comment.