maven 2 - why these functionalities i am missing,thought i have the correct spring 3.0 jar -
I'm learning Spring by Reference Document 3.0
And I want to test the following functionality But these are not available ..
- @PostConstruct
- context.registershutdownhook
PS: I I am using Jdk 5.0
When I type in their eclipses, I get an error that they are not unreal ..
Below is my pom.xml: < / P>
& lt; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: / /maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; Com.SpringExample & lt; / Group & gt; & Lt; ArtifactId & gt; SpringExample & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Dependency & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework & lt; / Group & gt; & Lt; ArtifactId & gt; Spring Reference & lt; / ArtifactId> & Lt; Version & gt; 3.0.0.RELEASE & lt; / Edition & gt; & Lt; Scope & gt; Sequence & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; / Dependencies & gt; & Lt; / Project & gt;
-
@ javax.annotation.PostConstruct
has not been sent with spring, although spring supports it if it is found in class@PostConstruct
can be found in Java 6, but not in Java 5. You can find it in some EJB 3 downloads too. -
registerShutdownHook ()
is a method onconfiguration appContax
, which is the sub type ofApplicationContext
.
Comments
Post a Comment