0

Need a help !

I'm trying to connect spring security library to my project using Maven.

<dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>4.2.3.RELEASE</version>
    </dependency>


    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>4.2.3.RELEASE</version>
    </dependency>

Library org.springframework.security.core have been downloaded successfully.

But when i'm trying to extend my class(AuthorizedUser.class) from org.springframework.security.core.userdetails.User Intellij says, that can not resolve it. But other classes and interfaces from: org.springframework.security.core.userdetails resolving well. See the link...

When i goes to external library tree and opened org.springframework.security.core.userdetails library i saw User.class like this See the link...

Please, if anyone knows something about this problem, I'll be very thankful for any information

Windows 7

Intellij IDEA version 2017.2.4 Ultimate

Java version 1.8.0_144

Maven version 3.5.0

Andrii Chertok
  • 1,447
  • 1
  • 8
  • 9

1 Answers1

0

Maybe, you just need to create a constructor matching with super class or first try to create a class property instead of extending it just for test. apidoc

if it does not help, probably it is not related to ide, it is possible maven could not resolve dependencies because of some misconfiguration.

You can try these:

1- check local maven repository and confirm right version of jar files are there.

c:\users{username}.m2\repository\org\springframework\security

2- try build from commandline with following command and confirm build finish succesfully

mvn clean install

3- Try reimport all maven project

enter image description here

4 - Also, confirm intellij use right maven version, repository and settings xml. You can write "maven settings" on search bar, ant it will lead you to maven settings page.

if you find any of them is not as expected, let me know so I will try to help.

clockworks
  • 3,755
  • 5
  • 37
  • 46
  • Thanx for an answer. But i've done all that you descibed above earlier and nothing changed. Maven dependecies resolving well and maven compiling with success. Problem is that User.class of org.springframework.security.core.userdetails library not resolving. And when i'm trying to open it in IDEA, i see symbols(screen on first link)... – Andrii Chertok Sep 19 '17 at 06:06