<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Inject Spring Bean from external´s jar libraries</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120735967" />
  <subtitle>Inject Spring Bean from external´s jar libraries</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120735967</id>
  <updated>2026-07-13T11:43:29Z</updated>
  <dc:date>2026-07-13T11:43:29Z</dc:date>
  <entry>
    <title>RE: RE: Inject Spring Bean from external´s jar libraries</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120739167" />
    <author>
      <name>Juan Miguel Leal Aragón</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120739167</id>
    <updated>2021-04-22T05:59:57Z</updated>
    <published>2021-04-22T05:59:56Z</published>
    <summary type="html">&lt;p&gt;Hi Olaf Kock&lt;/p&gt;
&lt;p&gt;Version of LIferay is 7.0-GA5&lt;/p&gt;
&lt;p&gt;I have a module project A and this contain externar library ext.jar.
  In this library (ext.jar) I have a Service Class with annotation
  @Service as follow:&lt;/p&gt;
&lt;p&gt;@Service(&amp;quot;helloWorldService&amp;quot;)&lt;br /&gt;public class
  HelloWorldService {&lt;/p&gt;
&lt;p&gt;I want inject like bean HelloWorldService  in my Util Class in module
  project A&lt;/p&gt;
&lt;p&gt;public class ProjectAUtils {&lt;/p&gt;
&lt;p&gt;    @Autowired&lt;/p&gt;
&lt;p&gt;    private static HelloWorldService helloWorldService;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;And in my bnd I have&lt;/p&gt;
&lt;p&gt;-includeresource: @ext-0.0.1.jar&lt;/p&gt;
&lt;p&gt;When execute my Utils, bean helloWorldService is null. I do multiples
  search in internet for a solution but I don´t succes&lt;/p&gt;
&lt;p&gt;How I can add context spring for my module project A  and inject this bean?&lt;/p&gt;
&lt;p&gt;Thanks in advanced&lt;/p&gt;</summary>
    <dc:creator>Juan Miguel Leal Aragón</dc:creator>
    <dc:date>2021-04-22T05:59:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Inject Spring Bean from external´s jar libraries</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120736080" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120736080</id>
    <updated>2021-04-21T12:37:55Z</updated>
    <published>2021-04-21T12:37:55Z</published>
    <summary type="html">&lt;p&gt;What have you tried so far, how did it behave, what did you observe
  and which Liferay version are you referring to? Please provide sample
  (simplified) code - as it is, it's hard to assume the proper context
  for this question.    &lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2021-04-21T12:37:55Z</dc:date>
  </entry>
  <entry>
    <title>Inject Spring Bean from external´s jar libraries</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120735966" />
    <author>
      <name>Juan Miguel Leal Aragón</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120735966</id>
    <updated>2021-04-21T10:43:18Z</updated>
    <published>2021-04-21T10:43:18Z</published>
    <summary type="html">&lt;p&gt;Good Morning&lt;/p&gt;
&lt;p&gt;I tried inject spring bean from external´s jar libraries into module
  project, but I can´t do it.&lt;/p&gt;
&lt;p&gt;How I cant do?&lt;/p&gt;
&lt;p&gt;Thanks in advanced&lt;/p&gt;</summary>
    <dc:creator>Juan Miguel Leal Aragón</dc:creator>
    <dc:date>2021-04-21T10:43:18Z</dc:date>
  </entry>
</feed>
