public class ExampleBean { @Inject private DependencyBean dependency; // ... } <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_2.xsd" bean-discovery-mode="all"> <scan> <exclude name="org.example.exclude.*" /> </scan> </beans> <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1.xsd"> <context-root>/myapp</context-root> <web-container> <jsp-container precompiled="false" scratchdir="target/myapp/jspc"/> </web-container> <dependency> <groupId>org.apache.geronimo.framework</groupId> <artifactId>geronimo-framework</artifactId> <version>3.0.0</version> <type>car</type> </dependency> <!-- ... --> </web-app>


上一篇:
下一篇:
切换中文