spring-social-twitter implements Twitter login and introduces a sample blog, So I got stuck when I was making a copy.
In the first place, I couldn't find any example of spring-social-twitter + Spring Boot login. I tried several of them until I got to this sample and it didn't work, so I was wondering if the sample was wrong. After a few hours of struggle, I was able to resolve it, so I will write about the process.
There is an error in ProviderSignInUtils
, which is red in the screenshot.
The error message is
[Java] The constructor ProviderSignInUtils(ConnectionFactoryLocator, UsersConnectionRepository) is undefined
It seems that it is output and it is not defined. import Isn't the correct library referenced by mistake? And, In the first place, isn't such a constructor defined? I checked.
Apparently import is correct compared to sample, [Reference](https://docs.spring.io/autorepo/docs/spring-social/1.1.4.RELEASE/apidocs/org/springframework/social/connect/web/ProviderSignInUtils The same constructor is defined in .html).
Constructor and Description |
---|
ProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository connectionRepository) |
I can't use something! I do not understand what it means. .. .. .. .. Is the editor bad? I thought, I tried it with Eclipse. While struggling variously, I noticed that if I right-click on the constructor, I can go to the definition source, and when I try it ...
The reference source of ProviderSignInUtils
is slightly different!
The reference source where the error occurs is on the left side of the screen. The editor wasn't wrong because it wasn't defined. (I thought so ...)
Looking at the version, it seems that the sample is 2014 and I am implementing 2015.
spring-social-twitter is defined in Maven and is using release 1.1.2.
<dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-twitter</artifactId> <version>1.1.2.RELEASE</version> </dependency>
It seems that the sample gradle is used and it is as follows. I don't write a release called gradle. I don't know the version.
dependencies { compile('org.springframework.boot:spring-boot-starter-social-twitter') }
I'm going to update it to the latest version for the time being Official page of spring-social-twitter, But I can't find the description Even on the site I often use MVN Repository, I can't find 1.1.2 in the latest version, but it's just one step away. It was 2 o'clock and it was a weekday, so I stopped because it was about to reach the limit considering tomorrow.
By the way, the official page of spring-social-twitter states that 1.1.0 is the latest version. What happened!
The next day, when I looked it up at the end of work, I arrived at a site with the latest release in one shot is the same site as the previous day, but When I search with the query "spring social twitter maven", the page with only the old version is displayed as the search result. By entering the keywords "spring boot social twitter maven" and boot, the latest page is now displayed as search results!
Since I trusted Google search completely, it is unlikely that sites that are not displayed in the former will be displayed in the latter ... This is the era when search ability is important.
The problem goes away when I sleep! Clean! !!