Spring: bean as constructor argument in Java Config -


translation Which is the correct way of this bean:

  & Lt; Bean id = "artifact binding" class = "org.springframework.security.saml.processor.HTTPArtifactBinding"> & Lt; constructor-arg ref = "parserpool" /> & Lt; constructor-arg ref = "velocityEngine" /> & Lt; Manufacturer-Arg & gt; & Lt; Bean class = "org.springframework.security.saml.websso.ArtifactResolutionProfileImpl" & gt; & Lt; Manufacturer-Arg & gt; & Lt; Bean square = "org.apache.commons.httpclient.HttpClient" & gt; & Lt; Manufacturer-Arg & gt; & Lt; Bean square = "org.apache.commons.httpclient.MultiThreadedHttpConnectionManager" /> & Lt; / Creator-arg & gt; & Lt; / Bean & gt; & Lt; / Creator-arg & gt; & Lt; Property Name = "Processor" & gt; & Lt; Bean class = "org.springframework.security.saml.processor.SAMLProcessorImpl" & gt; & Lt; constructor-arg ref = "soap" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; / Bean & gt; & Lt; / Creator-arg & gt; & Lt; / Bean & gt; & Lt; Bean id = "SoapBinding" class = "org.springframework.security.saml.processor.HTTPSOAP11 binding" & gt; & Lt; constructor-arg ref = "parserpool" /> & Lt; / Bean & gt;   

XML to Java-Config?

You can also do this

  @bean public HTTPArtifactBinding artifactBinding (Parserpool Parserpool, Velike Engine Velocity engine) Narrow the required collaborative object scope {New HTTPArtifactBinding (Parserpool, Velocity Enlargement, Artifact Resolve Profile ()); }   

If the spring can solve parser and velocity enzymes, then it can be included in your @beandef method.

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -