[NoSuchBeanDefinitionException error] Migrate custom plugin to Jira 10

Hi community!
We’re trying to get our plugin working under Jira 10, but at the moment have encountered that for some reason, the plugin won’t start as it can’t create one of the beans.

I crash with the following error (this is the very end of the stacktrace):

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘jira.plugin.configs.PluginSettingsService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781)

This seems to be a common error and I've already found a similar one here: https://community.developer.atlassian.com/t/nosuchbeandefinitionexception-in-jira-plugin/90054/5

But I still don’t understand if the following items are necessary when migrating to Jira 10:

  1. Do I need to migrate my plugin from Atlassian-spring-scanner-v1 to Atlassian-spring-scanner-v2?
  2. Do I need to migrate my plugin from rest-v1 to rest-v2?

Okay, I have managed the first problem:
The solution was easy:
Missing atlassian-spring-scanner-maven-plugin in your pom, or it’s it in <pluginManagement> but not in <plugins>. (Check that your built plugin jar contains the expected plugin-components as below.)
from the article: Bitbucket
Also, don’t forget to update your atlassian.spring.scanner.version
But now I have another problem:

    Caused by: java.lang.NoSuchMethodException: Could not find a suitable constructor in jira.plugin.rest.worklog.PluginWorklogController class.
    	at org.glassfish.jersey.inject.hk2.JerseyClassAnalyzer.getConstructor(JerseyClassAnalyzer.java:168) [jersey-hk2-2.45.jar:?]
    	at org.jvnet.hk2.internal.Utilities.getConstructor(Utilities.java:156) [hk2-locator-2.6.1.jar:?]
    	at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1042) [hk2-locator-2.6.1.jar:?]
    	... 327 more
    , referer=Unknown, servletErrorMessage=}

And eventually, the problem was solved.
Don’t forget to change @Autowired to @Inject in all controllers where you use @Path annotation