In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how to configure jspXCMS files". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Configuration file directory
/ src/main/resources/conf/plugin
The core of secondary development is the configuration file, which integrates different modules and plug-ins together. You can create your own folder under this directory, such as abc, novel, etc. In this case, plug, or / src/main/resources/conf/plugin/plug.
Spring configuration automatic loading
The configuration file named context*.xml under the configuration files directory and its subdirectories is automatically loaded as Spring's WebApplicationContext.
The class that triggers the automatic loading is com.jspxcms.core.Application, and the related code is @ ImportResource ({"classpath:conf/**/context*.xml", "classpath:custom.xml"}).
The configuration file / src/main/resources/conf/plugin/plug/context.xml in this example complies with the automatic loading rule, and the configuration in this class will be loaded in the file. The following are loaded in this class:
Entity:@EntityScan ({"com.jspxcms.plug.domain"})
Dao:@EnableJpaRepositories (basePackages = {"com.jspxcms.plug.repository"}, repositoryFactoryBeanClass = MyJpaRepositoryFactoryBean.class)
Service and receptionist Controller:@ComponentScan ({"com.jspxcms.plug.service.impl", "com.jspxcms.plug.web.fore"})
Background Controller configuration automatically loads
The configuration file named backend*.xml under the configuration file directory and its subdirectories is automatically loaded as background Controller.
The class that triggers the automatic loading is com.jspxcms.core.BackendWebConfig, and the related code is @ ImportResource ({"classpath:conf/**/backend*.xml"}).
The configuration file / src/main/resources/conf/plugin/plug/backend.xml in this example conforms to the automatic loading rule.
This configuration automatically loads all classes with Controller or ControllerAdvice annotations under the com.jspxcms.plug.web.back package.
Conf.properties automatic loading
The foreground template Freemarker tag, internationalization file directory and other configurations are configured in conf.properties.
Files named conf*.properties under the configuration files directory and its subdirectories are loaded automatically.
The class that triggers the automatic loading is com.jspxcms.core.ShiroConfig, and the related code is: loader.setValue ("classpath:conf/plugin/**/conf*.properties", "classpath:conf/conf.properties");.
The configuration file / src/main/resources/conf/plugin/plug/conf.properties in this example conforms to the auto-loading rule.
Menu.yml automatic loading
The background function menu and permissions are configured by this file.
Files named menu*.yml under the configuration files directory and its subdirectories are loaded automatically.
The class that triggers the automatic loading is com.jspxcms.core.MenuConfig, and the related code is: appContext.getResources ("classpath:conf/**/menu*.yml")
The configuration file / src/main/resources/conf/plugin/plug/menu.properties in this example conforms to the auto-loading rule.
That's all for "how to configure jspXCMS File". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.