@Configuration
@ComponentScan(basePackages="com.publiccms",
excludeFilters=)
@MapperScan(basePackages="com.publiccms.logic.mapper")
@PropertySource(value="classpath:cms.properties")
@EnableTransactionManagement
@EnableScheduling
public class ApplicationConfig
extends java.lang.Object
implements org.springframework.context.EnvironmentAware
限定符和类型 | 字段和说明 |
---|---|
private org.springframework.core.env.Environment |
env |
构造器和说明 |
---|
ApplicationConfig() |
限定符和类型 | 方法和说明 |
---|---|
CacheEntityFactory |
cacheEntityFactory()
缓存工厂
|
javax.sql.DataSource |
dataSource()
数据源
|
DirectiveComponent |
directiveComponent()
指令组件
|
org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer |
freeMarkerConfigurer()
FreeMarker配置工厂
|
private java.lang.String |
getDirPath(java.lang.String path) |
private java.util.Map<java.lang.String,java.lang.String> |
getMap(java.lang.String property) |
org.springframework.beans.factory.FactoryBean<org.hibernate.SessionFactory> |
hibernateSessionFactory(javax.sql.DataSource dataSource)
Hibernate 会话工厂类
|
org.springframework.orm.hibernate5.HibernateTransactionManager |
hibernateTransactionManager(org.hibernate.SessionFactory sessionFactory)
Hibernate 事务管理
|
IdWorker |
idWorker()
序列生成器
|
org.springframework.context.MessageSource |
messageSource(MenuMessageComponent menuMessageComponent)
国际化处理
|
org.springframework.web.multipart.support.StandardServletMultipartResolver |
multipartResolver()
文件上传解决方案
|
org.mybatis.spring.SqlSessionFactoryBean |
mybatisSqlSessionFactoryBean(javax.sql.DataSource dataSource)
Mybatis会话工厂
|
org.springframework.scheduling.quartz.SchedulerFactoryBean |
scheduler()
任务计划工厂
|
void |
setEnvironment(org.springframework.core.env.Environment environment) |
SiteComponent |
siteComponent()
站点组件
|
javax.validation.ValidatorFactory |
validatorFactoryBean()
验证工厂
|
public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment
在接口中 org.springframework.context.EnvironmentAware
@Bean public IdWorker idWorker()
@Bean public javax.sql.DataSource dataSource()
@Bean public org.springframework.orm.hibernate5.HibernateTransactionManager hibernateTransactionManager(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- @Bean public org.mybatis.spring.SqlSessionFactoryBean mybatisSqlSessionFactoryBean(javax.sql.DataSource dataSource) throws java.io.IOException
dataSource
- java.io.IOException
@Bean public org.springframework.beans.factory.FactoryBean<org.hibernate.SessionFactory> hibernateSessionFactory(javax.sql.DataSource dataSource) throws java.io.IOException
dataSource
- java.io.IOException
@Bean public javax.validation.ValidatorFactory validatorFactoryBean()
@Bean public CacheEntityFactory cacheEntityFactory() throws java.io.IOException
java.io.IOException
@Bean public org.springframework.context.MessageSource messageSource(MenuMessageComponent menuMessageComponent)
menuMessageComponent
- @Bean public DirectiveComponent directiveComponent()
@Bean public SiteComponent siteComponent()
@Bean public org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer freeMarkerConfigurer() throws java.io.IOException
java.io.IOException
@Bean public org.springframework.scheduling.quartz.SchedulerFactoryBean scheduler()
@Bean public org.springframework.web.multipart.support.StandardServletMultipartResolver multipartResolver()
private java.util.Map<java.lang.String,java.lang.String> getMap(java.lang.String property)
property
- private java.lang.String getDirPath(java.lang.String path)
path
-