Action Customization > MVC Components > MVC Components Overview > MVC > MVC Builders > Registering Builders (Legacy Method)
Registering Builders (Legacy Method)
The methods that were previously available for registering custom MVC builders are provided here for reference during migration. These methods are not supported by the Windchill+ CCD process and will not be deployed on your Windchill+ instance.
Automated Scanning
You can configure to automatically pick up all builders within a certain package hierarchy. To do this, add the <mvc:builder-scan/> configuration element to <Windchill>\codebase\config\mvc\custom.xml.
<beans xmlns="xmlns:mvc="http://www.ptc.com/schema/mvc"
xsi:schemaLocation="http://www.ptc.com/schema/mvc
http://www.ptc.com/schema/mvc/mvc-10.0.xsd">
<mvc:builder-scan base-package="com.ptc.windchill.enterprise.preference.mvc.builders"/>
</beans>
The builder-scan implementation scans the entire classpath. This has additional implications:
Classes that are outside your interest but are available in the classpath and match the package hierarchy, will also get scanned.
Each scan adds up time, so any unnecessary scanning can degrade performance (Method Server startup).
So, ensure that you are specific with the package name (for example, don’t scan com.ptc.*). Use the OOTB scan provided on the com.ptc.mvc.builders base package. To use this, all the builders that you author should be under the com.ptc.mvc.builders package. If you are not using the OOTB scan, it is recommended to use the builder-scan method only if there are more than 10 builders in the package.
這是否有幫助?