Spring 4.0.8 v.s JavaEE 8

Area
Spring
JavaEE
Injection
@component
@Autowire
@Named
@Qualifier
@Inject
Lifecycle@Scope("session")@SessionScoped
xml based componentcomponents.xmlbeans.xml
xml based bean by factory
<bean id="fileValidator"  class="cz.instance.transl.validation.file.FileValidator"
 factory-method="createInstance" />
@Produces
@Disposes
@PostConstruct
@PreDestroy
AOPSpring AOP @Aspect
                    @Around
@Interceptor
@InterceptorBinding
profile
Spring beans profile
<beans profile="test2">
definition in beans.xml
<beans ... >
    <alternatives>
        <class>encoder.TestCoderImpl</class>
    </alternatives>
</beans>
dynamic solution: Apache DeltaSpike ProjectStage or
your own CDI extension
property file place-holder
@Value("${port}")
Apache DeltaSpike @configProperty(name="port")
or
your own CDI extension

No comments :

Post a Comment