v 1.5.0 RC2

v 1.5.0 RC2
This commit is contained in:
shimingxy
2020-05-16 11:54:58 +08:00
parent 7c180f33be
commit e33c6dfd0b
37 changed files with 931 additions and 1209 deletions

View File

@@ -1,18 +1,23 @@
package org.maxkey;
import java.io.IOException;
import java.util.Properties;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import javax.sql.DataSource;
import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.tomcat.util.descriptor.web.SecurityCollection;
import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
import org.maxkey.authz.oauth2.provider.endpoint.TokenEndpointAuthenticationFilter;
import org.maxkey.authn.RealmAuthenticationProvider;
import org.maxkey.authn.SavedRequestAwareAuthenticationSuccessHandler;
import org.maxkey.crypto.password.PasswordReciprocal;
import org.maxkey.crypto.password.opt.algorithm.KeyUriFormat;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.ErrorPage;
@@ -21,20 +26,20 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
import com.google.code.kaptcha.Producer;
import com.google.code.kaptcha.impl.DefaultKaptcha;
import com.google.code.kaptcha.util.Config;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
@Configuration
@ImportResource(locations = { "classpath:spring/maxkey.xml" })
@PropertySource("classpath:/application.properties")
@PropertySource("classpath:/config/applicationConfig.properties")
@MapperScan("org.maxkey.dao.persistence,")
public class MaxKeyConfig {
private static final Logger _logger = LoggerFactory.getLogger(MaxKeyConfig.class);
@Value("${server.port:8080}")
private int port;
@@ -42,10 +47,13 @@ public class MaxKeyConfig {
return port;
}
public void setPort(int port) {
this.port = port;
@Bean
@Primary
@ConfigurationProperties("spring.datasource")
public DataSource dataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
public FilterRegistrationBean<TokenEndpointAuthenticationFilter> TokenEndpointAuthenticationFilter() {
FilterRegistrationBean<TokenEndpointAuthenticationFilter> registration = new FilterRegistrationBean<TokenEndpointAuthenticationFilter>();
@@ -66,6 +74,7 @@ public class MaxKeyConfig {
return new WebServerFactoryCustomizer<ConfigurableWebServerFactory>() {
@Override
public void customize(ConfigurableWebServerFactory factory) {
_logger.debug("WebServerFactoryCustomizer ... ");
ErrorPage errorPage400 = new ErrorPage(HttpStatus.BAD_REQUEST, "/exception/error/400");
ErrorPage errorPage404 = new ErrorPage(HttpStatus.NOT_FOUND, "/exception/error/404");
ErrorPage errorPage500 = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/exception/error/500");
@@ -111,21 +120,52 @@ public class MaxKeyConfig {
return new SavedRequestAwareAuthenticationSuccessHandler();
}
/**
* Captcha Producer Config .
* @return Producer
* @throws IOException
*/
@Bean(name = "captchaProducer")
public Producer captchaProducer() throws IOException{
Resource resource = new ClassPathResource("config/kaptcha.properties");
_logger.debug("Kaptcha config file " + resource.getURL());
DefaultKaptcha kaptcha=new DefaultKaptcha();
Properties properties = new Properties();
properties.load(resource.getInputStream());
Config config = new Config(properties);
kaptcha.setConfig(config);
return kaptcha;
@Value("${config.otp.keyuri.format.type:totp}")
String keyuriFormatType;
@Value("${config.otp.keyuri.format.domain:MaxKey.top}")
String keyuriFormatDomain;
@Value("${config.otp.keyuri.format.issuer:MaxKey}")
String keyuriFormatIssuer;
@Value("${config.otp.keyuri.format.digits:6}")
int keyuriFormatDigits;
@Value("${config.otp.keyuri.format.period:30}")
int keyuriFormatPeriod;
@Bean(name = "keyUriFormat")
public KeyUriFormat keyUriFormat() {
KeyUriFormat keyUriFormat=new KeyUriFormat();
keyUriFormat.setType(keyuriFormatType);
keyUriFormat.setDomain(keyuriFormatDomain);
keyUriFormat.setIssuer(keyuriFormatIssuer);
keyUriFormat.setDigits(keyuriFormatDigits);
keyUriFormat.setPeriod(keyuriFormatPeriod);
_logger.debug("KeyUri Format " + keyUriFormat);
return keyUriFormat;
}
@Bean(name = "authenticationProvider")
public RealmAuthenticationProvider authenticationProvider() {
return new RealmAuthenticationProvider();
}
@Bean(name = "jdbcTemplate")
public JdbcTemplate jdbcTemplate(DataSource dataSource) {
return new JdbcTemplate(dataSource);
}
@Bean(name = "sqlSession")
public SqlSessionTemplate sqlSession(SqlSessionFactory sqlSessionFactory) throws Exception {
return new SqlSessionTemplate(sqlSessionFactory);
}
@Bean(name = "transactionManager")
DataSourceTransactionManager transactionManager(DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
}

View File

@@ -0,0 +1,50 @@
package org.maxkey;
import org.maxkey.persistence.redis.RedisConnectionFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import redis.clients.jedis.JedisPoolConfig;
@Configuration
@PropertySource("classpath:/application.properties")
public class RedisAutoConfiguration {
@Value("${spring.redis.host}")
private String host;
@Value("${spring.redis.port}")
private int port;
@Value("${spring.redis.timeout}")
private int timeout;
@Value("${spring.redis.password}")
private String password;
@Value("${spring.redis.lettuce.pool.max-active}")
private int maxActive;
@Value("${spring.redis.jedis.pool.max-wait}")
private int maxWait;
@Value("${spring.redis.jedis.pool.max-idle}")
private int maxIdle;
@Value("${spring.redis.lettuce.pool.min-idle}")
private int minIdle;
@Bean
public RedisConnectionFactory redisConnectionFactory() {
RedisConnectionFactory factory = new RedisConnectionFactory();
factory.setHostName(host);
factory.setPort(port);
factory.setTimeOut(timeout);
factory.setPassword(password);
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxIdle(maxIdle);
poolConfig.setMinIdle(minIdle);
poolConfig.setMaxTotal(maxActive);
poolConfig.setMaxWaitMillis(maxWait);
factory.setPoolConfig(poolConfig);
return factory;
}
}

View File

@@ -10,8 +10,8 @@ import org.maxkey.crypto.password.opt.algorithm.OtpSecret;
import org.maxkey.dao.service.UserInfoService;
import org.maxkey.domain.UserInfo;
import org.maxkey.util.RQCodeUtils;
import org.maxkey.web.ImageEndpoint;
import org.maxkey.web.WebContext;
import org.maxkey.web.image.ImageEndpoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -80,7 +80,7 @@ public class RegistrationController {
email.setAuthenticator(new DefaultAuthenticator(applicationConfig.getEmailConfig().getUsername(), applicationConfig.getEmailConfig().getPassword()));
email.addTo(registration.getWorkEmail(), registration.getLastName()+registration.getFirstName());
email.setFrom(applicationConfig.getEmailConfig().getSenderMail(), "ConnSec");
email.setFrom(applicationConfig.getEmailConfig().getSender(), "ConnSec");
email.setSubject("ConnSec Cloud Identity & Access Registration activate Email .");
String activateUrl=WebContext.getHttpContextPath()+"/registration/forward/activate/"+registration.getId();

View File

@@ -0,0 +1,5 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.maxkey.RedisAutoConfiguration,\
org.maxkey.config.KaptchaAutoConfiguration,\
org.maxkey.config.MvcAutoConfiguration

View File

@@ -1,3 +1,8 @@
#spring.profiles.active=dev
#application
application.title=MaxKey
application.name=MaxKey
application.formatted-version=v1.5.0 GA
#server config
#spring.profiles.active=dev
#server port
@@ -9,13 +14,41 @@ server.ssl.key-alias=maxkey
server.ssl.enabled=true
server.ssl.key-store-password=maxkey
server.ssl.key-store-type=JKS
#web app context path
server.servlet.context-path=/maxkey
application.name=MaxKey
application.formatted-version=v1.5.0 GA
spring.servlet.multipart.enabled=true
spring.servlet.multipart.max-file-size=4194304
#encoding
#server.servlet.encoding.charset=UTF-8
#server.servlet.encoding.enabled=true
#server.servlet.encoding.force=true
#datasource
spring.datasource.username=root
spring.datasource.password=maxkey
spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#mybatis
mybatis.type-aliases-package=org.maxkey.domain,org.maxkey.domain.apps,
mybatis.mapper-locations=classpath*:/org/maxkey/dao/persistence/xml/mysql/*.xml
#redis
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=password
spring.redis.timeout=10000
spring.redis.jedis.pool.max-wait=1000
spring.redis.jedis.pool.max-idle=200
spring.redis.lettuce.pool.max-active=-1
spring.redis.lettuce.pool.min-idle=0
#mail
spring.mail.default-encoding=utf-8
spring.mail.host=smtp.163.com
spring.mail.port=465
spring.mail.username=maxkey@163.com
spring.mail.password=password
spring.mail.protocol=smtp
spring.mail.properties.ssl=true
spring.mail.properties.sender=maxkey@163.com
#for freemarker
spring.freemarker.template-loader-path=classpath:/templates/views
spring.freemarker.cache=false
@@ -26,8 +59,9 @@ spring.freemarker.expose-request-attributes=false
spring.freemarker.expose-session-attributes=false
spring.freemarker.request-context-attribute=request
spring.freemarker.suffix=.ftl
#static resources
spring.mvc.static-path-pattern=/static/**
spring.messages.basename=classpath:messages/message
spring.messages.encoding=UTF-8
#main
spring.main.allow-bean-definition-overriding=true

View File

@@ -8,73 +8,9 @@ config.server.name=http://${config.server.domain.sub}
config.server.prefix.uri=${config.server.name}/maxkey
#default.uri
config.server.default.uri=${config.server.prefix.uri}/maxkey/appList
config.server.manage.uri=${config.server.name}:9521/maxkey-mgt/login
############################################################################
# DataBase configuration
############################################################################
#db2,derby,mysql,oracle,postgresql,sqlserver at com.connsec.db.mybatis.dialect.Dialect
config.datasource.database=mysql
# JDBC Driver
# for MySql com.mysql.jdbc.Driver
# for oracle oracle.jdbc.driver.OracleDriver
# for DB2 com.ibm.db2.jdbc.app.DB2Driver
# for SqlServer com.microsoft.jdbc.sqlserver.SQLServerDriver
# for SyBase com.sybase.jdbc.SybDriver
# for PostgreSQL org.postgresql.Driver
# for Derby org.apache.derby.jdbc.ClientDriver
config.datasource.driverclass=com.mysql.jdbc.Driver
# JDBC URL
# you need database hostname,port,databasename
# for MySql jdbc:mysql://hostname:port/secdb
# for oracle jdbc:oracle:thin:@hostname:port:secdb
# for DB2 jdbc:db2://hostname:port/secdb
# for SqlServer jdbc:microsoft:sqlserver://hostname:port;DatabaseName=secdb
# for SyBase jdbc:sybase:Tds:hostname:port/secdb
# for Derby jdbc:derby://localhost:1527/secdb
#
config.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8
config.datasource.username=root
config.datasource.password=maxkey
config.datasource.password.encrypt=false
############################################################################
# EMAIL configuration
############################################################################
config.email.username=maxkey@163.com
config.email.password=password
config.email.smtpHost=smtp.163.com
config.email.port=465
config.email.senderMail=maxkey@163.com
config.email.ssl=true
############################################################################
# CharacterEncoding configuration
############################################################################
# CharacterEncoding true/false
config.characterencoding.encoding=true
config.characterencoding.charset.from=iso8859-1
config.characterencoding.charset.to=UTF-8
config.server.management.uri=${config.server.name}:9521/maxkey-mgt/login
config.app.issuer=CN=ConSec,CN=COM,CN=SH
############################################################################
#IP
config.redis.hostname=127.0.0.1
#port
config.redis.port=6379
#password
config.redis.password=password
#
config.redis.timeout=10000
#
config.redis.pool.maxtotal=1000
#
config.redis.pool.maxidle=200
#
config.redis.pool.maxwaitmillis=1000
#
config.redis.pool.testonborrow=true
############################################################################
# Login configuration
#enable captcha
@@ -98,6 +34,13 @@ config.login.remeberme.validity=
config.login.default.uri=appList
config.ipaddress.whitelist=false
config.otp.keyuri.format.type=totp
config.otp.keyuri.format.digits=6
config.otp.keyuri.format.issuer=MaxKey
config.otp.keyuri.format.domain=${config.server.domain}
config.otp.keyuri.format.period=30
############################################################################
# Kerberos Login configuration
############################################################################

View File

@@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- dataSource define begin -->
<!-- dataSource configuration -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close" >
<!-- <property name="driverClass" value="#{dataSoruceConfig.driverClass}"/> -->
<property name="url" value="#{dataSoruceConfig.url}"/>
<property name="username" value="#{dataSoruceConfig.username}"/>
<property name="password" value="#{dataSoruceConfig.password}"/>
</bean>
<!-- JNDI data source configuration -->
<!-- jndiName is jndi name -->
<!-- if you don,t want use prefix 'java:comp/env/' set resourceRef to true,default is false -->
<!--
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jndi_maxkey_db" />
<property name="resourceRef" value="true" />
</bean> -->
<!-- dataSource define end -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"></property>
</bean>
<!-- Declare a transaction manager -->
<!-- transaction manager, use JtaTransactionManager for global tx-->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- Enable annotation style of managing transactions
<tx:annotation-driven transaction-manager="transactionManager" />-->
<!-- enable component scanning (beware that this does not enable mapper scanning!) -->
<context:component-scan base-package="org.maxkey.dao.service" />
<!-- enable autowire -->
<context:annotation-config />
<!-- enable transaction demarcation with annotations
<tx:annotation-driven />-->
<!--<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">-->
<bean id="sqlSessionFactory" class="org.apache.mybatis.jpa.MyBatisSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="dialect" value="mysql" />
<property name="timeout" value="30" />
<property name="transactionFactory">
<bean class="org.apache.ibatis.transaction.managed.ManagedTransactionFactory" />
</property>
<property name="typeAliasesPackage"
value="
org.maxkey.domain,
org.maxkey.domain.apps,
" />
<property name="mapperLocations" value="classpath*:/org/maxkey/dao/persistence/xml/#{dataSoruceConfig.database}/*.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="sqlSessionFactory" />
</bean>
<!-- scan for mappers and let them be autowired -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage"
value="
org.maxkey.dao.persistence,
" />
</bean>
<bean id="redisConnectionFactory" class="org.maxkey.persistence.redis.RedisConnectionFactory">
<property name="hostname" value="${config.redis.hostname}"/>
<property name="port" value="${config.redis.port}"/>
<property name="timeOut" value="${config.redis.timeout}"/>
<property name="poolConfig" >
<bean class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="${config.redis.pool.maxtotal}" />
<property name="maxIdle" value="${config.redis.pool.maxidle}" />
<property name="maxWaitMillis" value="${config.redis.pool.maxwaitmillis}" />
<property name="testOnBorrow" value="${config.redis.pool.testonborrow}" />
</bean>
</property>
</bean>
</beans>

View File

@@ -75,15 +75,11 @@
<bean id="remeberMeService" class="org.maxkey.authn.support.rememberme.InMemoryRemeberMeService">
</bean>
<bean id="keyUriFormat" class="org.maxkey.crypto.password.opt.algorithm.KeyUriFormat">
<property name="type" value="totp" />
<property name="digits" value="6" />
<property name="issuer" value="MaxKey" />
<property name="domain" value="MaxKey.org" />
<property name="period" value="30" />
</bean>
<!--
<bean id="remeberMeService" class="org.maxkey.authn.support.rememberme.RedisRemeberMeService">
<property name="connectionFactory" ref="redisConnectionFactory"></property>
</bean>
-->
<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.TimeBasedOtpAuthn">
</bean>
<!--
@@ -98,7 +94,6 @@
<bean id="tfaMobileOptAuthn" class="org.maxkey.crypto.password.opt.impl.sms.SmsOtpAuthnYunxin">
</bean>
<!-- Authentication Password Encoder Config -->
<bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"></bean>
@@ -146,11 +141,6 @@
<bean id="authenticationRealm" class="org.maxkey.authn.realm.jdbc.JdbcAuthenticationRealm">
<constructor-arg ref="jdbcTemplate"/>
</bean>
<!-- Authentication providers -->
<bean id="authenticationProvider" class="org.maxkey.authn.RealmAuthenticationProvider" >
</bean>
<mvc:annotation-driven />

View File

@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- LocaleResolver -->
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="cookieDomain" value="#{applicationConfig.subDomainName}"/>
<property name="cookieName" value="maxkey_lang"/>
<property name="cookieMaxAge" value="604800" />
<!-- auto select language by brower remove -->
<!--<property name="defaultLocale" value="en" /> -->
</bean>
<!-- 消息处理可以直接使用properties的key值返回的是对应的value值 -->
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:messages/message</value>
</list>
</property>
<!-- 必须设置成false否则hibernate原有的校验信息无法返回value值-->
<property name="useCodeAsDefaultMessage" value="false"/>
</bean>
<!-- Locale Change Interceptor and Resolver definition -->
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="language" />
</bean>
<!-- XML bean Marshaller define -->
<bean id="Jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>org.maxkey.domain.xml.UserInfoXML</value>
</list>
</property>
</bean>
<!-- MarshallingHttpMessageConverter -->
<bean id="marshallingHttpMessageConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
<property name="marshaller" ref="Jaxb2Marshaller" />
<property name="unmarshaller" ref="Jaxb2Marshaller" />
<property name="supportedMediaTypes">
<list>
<value>application/xml;charset=UTF-8</value>
</list>
</property>
</bean>
<!--MappingJacksonHttpMessageConverter -->
<bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
</list>
</property>
</bean>
<!-- REST Client -->
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<property name="messageConverters">
<list>
<ref bean="marshallingHttpMessageConverter" />
<ref bean="mappingJacksonHttpMessageConverter" />
</list>
</property>
</bean>
<!-- AnnotationMethodHandlerAdapter -->
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<property name="messageConverters">
<util:list id="beanList">
<ref bean="marshallingHttpMessageConverter" />
<ref bean="mappingJacksonHttpMessageConverter" />
</util:list>
</property>
</bean>
<bean id="handlerMapping" class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
<property name="interceptors">
<list>
<ref bean="localeChangeInterceptor" />
</list>
</property>
</bean>
<!-- upload file support -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="4194304" />
</bean>
</beans>

View File

@@ -43,8 +43,6 @@
<context:component-scan base-package="org.maxkey.web.endpoint" />
<context:component-scan base-package="org.maxkey.web.contorller" />
<!-- persistence configuration -->
<import resource="maxkey-persistence.xml"/>
<!-- authn support -->
<import resource="maxkey-support.xml"/>
<!-- single sign on protocol -->
@@ -53,7 +51,5 @@
<import resource="maxkey-task.xml"/>
<!-- Basic Authn for user login -->
<import resource="maxkey-security.xml"/>
<!-- web mvc configuration -->
<import resource="maxkey-web.xml"/>
</beans>