Spring bean Scope Tenant cannot be resolved by Intellij

My Intellij IDE tells me that the tenant scope of my Bean definition cannot be resolved.

Although this does not stop me from deploying and running my application, it looks a little dirty. Is there any way to tell me Intellij how to solve this?

I tried adding coreserver.jar , which is a jar that contains the TenantScope class, to my module dependencies, but that did not work.

The error is displayed using the Intellij 'Spring Scopes' inspection. I must allow this inspection to somehow know that the tenant area is declared in an XML file in another module. I also tried adding this other module to the dependency on the petsplacecore module, but that didn't work either.

This is what my screen looks like:

enter image description here

Tenant's scope is declared in the yacceleratorstorefront module in the web-application-config.xml file, for example:

<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> <property name="scopes"> <map> <entry key="tenant" value="de.hybris.platform.spring.TenantScope"/> </map> </property> </bean> 
+4
source share
3 answers

If I add two Spring configuration files to the same set of files in Petsplacecore Spring Facet, then you can find a link to the rental area declaration.

As the picture below:

enter image description here

+4
source

The tenant area is the custom hybris area defined in the web application-config.xml, as:

 <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> <property name="scopes"> <map> <entry key="tenant" value="de.hybris.platform.spring.TenantScope"/> </map> </property> </bean> 

And you can find it in the platform /ext/core/bin/coreserver.jar - add this jar to your classpath. And my knowledge of IntelliJ ends, I'm afraid ...

+2
source

As with 5.0 hybrids, your tenant configuration files no longer require a tenant custom area, and therefore, you don’t need to get an Intellj IDEA to validate this custom area.

0
source

Source: https://habr.com/ru/post/1437972/


All Articles