diff --git a/build.gradle b/build.gradle index 430ed01a8..c82a69f51 100644 --- a/build.gradle +++ b/build.gradle @@ -166,6 +166,8 @@ subprojects { //implementation group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: "${notyetcommonssslVersion}" //tomcat embed Core Tomcat implementation implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}" + implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: "${tomcatVersion}" + implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: "${tomcatVersion}" //JULI logging implementation for embedded Tomcat implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: "${tomcatembedloggingjuliVersion}" //apache logs @@ -189,7 +191,7 @@ subprojects { implementation group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-expression', version: "${springVersion}" //implementation group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}" - //implementation group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}" + implementation group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}" //implementation group: 'org.springframework', name: 'spring-jms', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}" @@ -197,7 +199,7 @@ subprojects { implementation group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-tx', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-web', version: "${springVersion}" - //implementation group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}" + implementation group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}" implementation group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}" //implementation group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}" testImplementation group: 'org.springframework', name: 'spring-test', version: "${springVersion}" @@ -222,11 +224,19 @@ subprojects { implementation group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: "${springBootVersion}" + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version: "${springBootVersion}" + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: "${springBootVersion}" + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: "${springBootVersion}" + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-reactor-netty', version: "${springBootVersion}" implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}" + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis-reactive', version: "${springBootVersion}" testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}" + //spring-boot-admin + implementation group: 'de.codecentric', name: 'spring-boot-admin-client', version: '2.5.0' + implementation group: 'de.codecentric', name: 'spring-boot-admin-starter-client', version: "${springbootadminVersion}" //spring-data implementation group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}" implementation group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}" @@ -330,9 +340,11 @@ subprojects { implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}" implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}" implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}" + implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: "${jacksonVersion}" implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}" implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}" implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}" + implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: "${jacksonVersion}" implementation group: 'com.fasterxml', name: 'classmate', version: "${classmateVersion}" implementation group: 'com.alibaba', name: 'fastjson', version: "${fastjsonVersion}" //docs diff --git a/gradle.properties b/gradle.properties index b8a971fde..ad140397c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -46,6 +46,9 @@ springretryVersion =1.3.0 springplugincoreVersion =2.0.0.RELEASE springpluginmetadataVersion =2.0.0.RELEASE springfoxVersion =3.0.0 +springcloudVersion =3.0.3 +springcloudalibabaVersion =2021.1 +springcloudalibabacsplVersion =1.8.2 #google jibGradlePluginVersion =2.7.1 kaptchaVersion =2.3.2 @@ -53,6 +56,7 @@ gsonVersion =2.8.6 guavaVersion =30.1.1-jre tinkVersion =1.4.0 zxingcoreVersion =3.4.1 +concurrentlinkedhashmaplruVersion =1.4.2 #jboss jbossloggingVersion =3.4.1.Final hibernateVersion =6.2.0.Final @@ -75,6 +79,13 @@ openwsVersion =1.5.6 xmltoolingVersion =1.4.6 javasupportVersion =7.5.1 #others +thymeleafVersion =3.0.12.RELEASE +springbootadminVersion =2.5.0 +nettyVersion =4.1.66.Final +hazelcastVersion =4.2.2 +jakartaannotationVersion =2.0.0 +attoparserVersion =2.0.5.RELEASE +unbescapeVersion =1.1.6.RELEASE jhlabsfiltersVersion =2.0.235-1 slf4jVersion =1.7.30 jacksonVersion =2.12.1 @@ -104,18 +115,22 @@ jaxbimplVersion =2.3.2 jaxbxjcVersion =2.3.2 classmateVersion =1.5.0 fastjsonVersion =1.2.74 -reactivestreamsVersion =1.0.2 -reactorcoreVersion =3.2.10.RELEASE +reactivestreamsVersion =1.0.3 +reactorcoreVersion =3.4.9 +reactornettyVersion =1.0.10 +reactorextraVersion =3.4.4 szxcvbnVersion =0.2 quartzVersion =2.3.2 jodatimeVersion =2.10.9 -snakeyamlVersion =1.26 +snakeyamlVersion =1.28 nekohtmlVersion =1.9.22 ognlVersion =3.2.14 cglibVersion =3.3.0 asmVersion =7.3.1 aopallianceVersion =1.0 aspectjtoolsVersion =1.9.4 +evictorVersion =1.0.0 +lettuceVersion =6.1.4.RELEASE #xml jdomVersion =2.0.2 dom4jVersion =1.6.1 diff --git a/maxkey-core/src/main/java/org/maxkey/autoconfigure/MvcAutoConfiguration.java b/maxkey-core/src/main/java/org/maxkey/autoconfigure/MvcAutoConfiguration.java index 9a1b16956..f5c2f0a22 100644 --- a/maxkey-core/src/main/java/org/maxkey/autoconfigure/MvcAutoConfiguration.java +++ b/maxkey-core/src/main/java/org/maxkey/autoconfigure/MvcAutoConfiguration.java @@ -37,6 +37,7 @@ import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.PropertySource; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.http.HttpStatus; @@ -198,6 +199,7 @@ public class MvcAutoConfiguration implements InitializingBean { * requestMappingHandlerAdapter . * @return requestMappingHandlerAdapter */ + @DependsOn("stringHttpMessageConverter") @Bean (name = "requestMappingHandlerAdapter") public RequestMappingHandlerAdapter requestMappingHandlerAdapter( MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter, diff --git a/maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/autoconfigure/SynchronizerAutoConfiguration.java b/maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/autoconfigure/SynchronizerAutoConfiguration.java index 12274cc02..425dffd6e 100644 --- a/maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/autoconfigure/SynchronizerAutoConfiguration.java +++ b/maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/autoconfigure/SynchronizerAutoConfiguration.java @@ -52,7 +52,7 @@ public class SynchronizerAutoConfiguration implements InitializingBean { public static final String SYNCHRONIZERS_SELECT_STATEMENT = "select * from mxk_synchronizers where status ='1'"; @Bean(name = "schedulerSynchronizerJobs") - public Scheduler schedulerSynchronizerJobs( + public String schedulerSynchronizerJobs( JdbcTemplate jdbcTemplate, SchedulerFactoryBean schedulerFactoryBean, @Value("${maxkey.job.cron.enable}") boolean jobCronEnable @@ -70,7 +70,7 @@ public class SynchronizerAutoConfiguration implements InitializingBean { } } } - return scheduler; + return "schedulerSynchronizerJobs"; } diff --git a/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java b/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java index 14a7acaae..572613f06 100644 --- a/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java +++ b/maxkey-persistence/src/main/java/org/maxkey/persistence/service/GroupsService.java @@ -17,6 +17,7 @@ package org.maxkey.persistence.service; +import java.io.Serializable; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.List; @@ -31,9 +32,17 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; +import com.fasterxml.jackson.annotation.JsonIgnore; + @Repository -public class GroupsService extends JpaBaseService{ +public class GroupsService extends JpaBaseService implements Serializable { + /** + * + */ + private static final long serialVersionUID = -4156671926199393550L; + final static Logger _logger = LoggerFactory.getLogger(GroupsService.class); + @JsonIgnore @Autowired @Qualifier("groupMemberService") GroupMemberService groupMemberService; @@ -110,6 +119,14 @@ public class GroupsService extends JpaBaseService{ } } } + + public GroupMemberService getGroupMemberService() { + return groupMemberService; + } + + public void setGroupMemberService(GroupMemberService groupMemberService) { + this.groupMemberService = groupMemberService; + } diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties index 1d97e4edc..978723179 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties +++ b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties @@ -19,10 +19,53 @@ server.port=8080 #session default 1800 server.servlet.session.timeout=1800 -#web app context path +#server context path server.servlet.context-path=/maxkey -spring.servlet.multipart.enabled=true -spring.servlet.multipart.max-file-size=4194304 + +############################################################################ +#domain name configuration # +############################################################################ +maxkey.server.scheme=http +maxkey.server.basedomain=maxkey.top +maxkey.server.domain=sso.${maxkey.server.basedomain} +maxkey.server.name=${maxkey.server.scheme}://${maxkey.server.domain} +maxkey.server.uri=${maxkey.server.name}/maxkey +#default.uri +maxkey.server.default.uri=${maxkey.server.uri}/maxkey/appList +maxkey.server.management.uri=${maxkey.server.name}:9521/maxkey-mgt/login +#InMemory 0 , Redis 2 +maxkey.server.persistence=0 +#identity +maxkey.identity.kafkasupport=false +#issuer name +maxkey.app.issuer=CN=ConSec,CN=COM,CN=SH +############################################################################ +#Login configuration # +############################################################################ +#enable captcha +maxkey.login.captcha=true +#text or arithmetic +maxkey.login.captcha.type=text +#enable two factor,use one time password +maxkey.login.mfa=true +#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud +maxkey.login.mfa.type=TimeBasedOtpAuthn +#enable social sign on +maxkey.login.socialsignon=true +#social sign on providers +maxkey.login.socialsignon.providers=gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin +#Enable kerberos/SPNEGO +maxkey.login.kerberos=true +#wsFederation +maxkey.login.wsfederation=false +#remeberme +maxkey.login.remeberme=true +#validity +maxkey.login.remeberme.validity=0 +#to default application web site +maxkey.login.default.uri=/appList +maxkey.ipaddress.whitelist=false +maxkey.notices.visible=false ############################################################################ #ssl configuration # ############################################################################ @@ -32,11 +75,6 @@ spring.servlet.multipart.max-file-size=4194304 #server.ssl.key-store-password=maxkey #server.ssl.key-store-type=JKS -#encoding -#server.servlet.encoding.charset=UTF-8 -#server.servlet.encoding.enabled=true -#server.servlet.encoding.force=true - ############################################################################ #database configuration # supported database @@ -60,7 +98,6 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #spring.datasource.password=maxkey! #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai #spring.datasource.driver-class-name=org.postgresql.Driver - #mybatis mybatis.dialect=mysql mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps, @@ -97,32 +134,7 @@ spring.mail.properties.mailotp.message.subject=MaxKey One Time PassWord spring.mail.properties.mailotp.message.template={0} You Token is {1} , it validity in {2} minutes. spring.mail.properties.mailotp.message.type=html spring.mail.properties.mailotp.message.validity=300 -############################################################################ -#freemarker configuration # -############################################################################ -spring.freemarker.template-loader-path=classpath:/templates/views -spring.freemarker.cache=false -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.expose-request-attributes=false -spring.freemarker.expose-session-attributes=false -spring.freemarker.request-context-attribute=request -spring.freemarker.suffix=.ftl -############################################################################ -#static resources configuration # -############################################################################ -spring.mvc.static-path-pattern=/static/** -spring.messages.basename=classpath:messages/message -spring.messages.encoding=UTF-8 - -############################################################################ -#Main.banner-mode configuration # -############################################################################ -spring.main.banner-mode=log -spring.main.allow-bean-definition-overriding=true - ############################################################################ #Spring Session for Cluster configuration # ############################################################################ @@ -156,60 +168,8 @@ spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.Str # partitioner # spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner -############################################################################ -#Management endpoints configuration # -############################################################################ -management.security.enabled=false -#management.endpoints.jmx.exposure.include=health,info -management.endpoints.web.exposure.include=metrics,health,info,env - -############################################################################ -#domain name configuration # -############################################################################ -maxkey.server.scheme=http -maxkey.server.basedomain=maxkey.top -maxkey.server.domain=sso.${maxkey.server.basedomain} -maxkey.server.name=${maxkey.server.scheme}://${maxkey.server.domain} -maxkey.server.uri=${maxkey.server.name}/maxkey -#default.uri -maxkey.server.default.uri=${maxkey.server.uri}/maxkey/appList -maxkey.server.management.uri=${maxkey.server.name}:9521/maxkey-mgt/login -#InMemory 0 , Redis 2 -maxkey.server.persistence=0 -#identity -maxkey.identity.kafkasupport=false - -maxkey.app.issuer=CN=ConSec,CN=COM,CN=SH -############################################################################ -#Login configuration # -############################################################################ -#enable captcha -maxkey.login.captcha=true -#text or arithmetic -maxkey.login.captcha.type=text -#enable two factor,use one time password -maxkey.login.mfa=true -#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud -maxkey.login.mfa.type=TimeBasedOtpAuthn -#enable social sign on -maxkey.login.socialsignon=true -#social sign on providers -maxkey.login.socialsignon.providers=gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin -#Enable kerberos/SPNEGO -maxkey.login.kerberos=true -#wsFederation -maxkey.login.wsfederation=false -#remeberme -maxkey.login.remeberme=true -#validity -maxkey.login.remeberme.validity=0 -#to default application web site -maxkey.login.default.uri=appList -maxkey.ipaddress.whitelist=false -maxkey.notices.visible=false - ############################################################################ -#Kerberos Login configuration # +#SMS Message Login configuration # #SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud # ############################################################################ #default @@ -239,30 +199,6 @@ maxkey.otp.keyuri.format.issuer=MaxKey maxkey.otp.keyuri.format.domain=${maxkey.server.domain} maxkey.otp.keyuri.format.period=30 -############################################################################ -#Kerberos Login configuration # -#short name of user domain must be in upper case,eg:MAXKEY # -############################################################################ -maxkey.support.kerberos.default.userdomain=MAXKEY -#short name of user domain must be in upper case,eg:MAXKEY.ORG -maxkey.support.kerberos.default.fulluserdomain=MAXKEY.ORG -#last 8Bit crypto for Kerberos web Authentication -maxkey.support.kerberos.default.crypto=846KZSzYq56M6d5o -#Kerberos Authentication server RUL -maxkey.support.kerberos.default.redirecturi=http://sso.maxkey.top/kerberos/authn/ -############################################################################ -#HTTPHEADER Login configuration # -############################################################################ -maxkey.support.httpheader.enable=false -maxkey.support.httpheader.headername=header-user -# iv-user is for IBM Security Access Manager -#config.httpheader.headername=iv-user - -############################################################################ -#BASIC Login support configuration # -############################################################################ -maxkey.support.basic.enable=false - ############################################################################ #LDAP Login support configuration # ############################################################################ @@ -288,6 +224,30 @@ maxkey.support.ldap.truststorepassword=maxkey #activedirectory effective maxkey.support.ldap.activedirectory.domain=MAXKEY.ORG +############################################################################ +#Kerberos Login configuration # +#short name of user domain must be in upper case,eg:MAXKEY # +############################################################################ +maxkey.support.kerberos.default.userdomain=MAXKEY +#short name of user domain must be in upper case,eg:MAXKEY.ORG +maxkey.support.kerberos.default.fulluserdomain=MAXKEY.ORG +#last 8Bit crypto for Kerberos web Authentication +maxkey.support.kerberos.default.crypto=846KZSzYq56M6d5o +#Kerberos Authentication server RUL +maxkey.support.kerberos.default.redirecturi=http://sso.maxkey.top/kerberos/authn/ + +############################################################################ +#HTTPHEADER Login configuration # +############################################################################ +maxkey.support.httpheader.enable=false +maxkey.support.httpheader.headername=header-user +# iv-user is for IBM Security Access Manager +#config.httpheader.headername=iv-user + +############################################################################ +#BASIC Login support configuration # +############################################################################ +maxkey.support.basic.enable=false ############################################################################# #WsFederation Login support configuration @@ -436,6 +396,19 @@ maxkey.socialsignon.facebook.account.id=id maxkey.socialsignon.facebook.hidden=false maxkey.socialsignon.facebook.sortorder=8 +############################################################################ +#Management endpoints configuration # +############################################################################ +management.security.enabled=false +#management.endpoints.jmx.exposure.include=health,info +#management.endpoints.web.exposure.include=metrics,health,info,env +management.endpoints.web.exposure.include=* +management.endpoint.health.show-details=ALWAYS +#Spring Boot Admin Client +spring.application.name=maxkey +spring.boot.admin.client.url=http://127.0.0.1:9528 +management.health.redis.enabled: false + ############################################################################ #springfox.documentation.swagger.v2.path=/api-docs # #Swagger Configure Properties # @@ -443,4 +416,44 @@ maxkey.socialsignon.facebook.sortorder=8 maxkey.swagger.enable=true maxkey.swagger.title=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 maxkey.swagger.description=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 -maxkey.swagger.version=${application.formatted-version} \ No newline at end of file +maxkey.swagger.version=${application.formatted-version} + +############################################################################ +#freemarker configuration # +############################################################################ +spring.freemarker.template-loader-path=classpath:/templates/views +spring.freemarker.cache=false +spring.freemarker.charset=UTF-8 +spring.freemarker.check-template-location=true +spring.freemarker.content-type=text/html +spring.freemarker.expose-request-attributes=false +spring.freemarker.expose-session-attributes=false +spring.freemarker.request-context-attribute=request +spring.freemarker.suffix=.ftl + +############################################################################ +#static resources configuration # +############################################################################ +spring.mvc.static-path-pattern=/static/** +spring.messages.basename=classpath:messages/message +spring.messages.encoding=UTF-8 + +############################################################################ +#server servlet encoding configuration # +############################################################################ +#encoding +#server.servlet.encoding.charset=UTF-8 +#server.servlet.encoding.enabled=true +#server.servlet.encoding.force=true + +############################################################################ +#Servlet multipart configuration # +############################################################################ +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=4194304 + +############################################################################ +#Main.banner-mode configuration # +############################################################################ +spring.main.banner-mode=log +spring.main.allow-bean-definition-overriding=true diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties index 55bf0c6cc..6a655eeeb 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties +++ b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties @@ -19,10 +19,55 @@ server.port=443 #session default 1800 server.servlet.session.timeout=1800 -#web app context path +#server context path server.servlet.context-path=/maxkey -spring.servlet.multipart.enabled=true -spring.servlet.multipart.max-file-size=4194304 + +############################################################################ +#domain name configuration # +############################################################################ +maxkey.server.scheme=https +maxkey.server.basedomain=maxkey.top +maxkey.server.domain=sso.${maxkey.server.basedomain} +maxkey.server.name=${maxkey.server.scheme}://${maxkey.server.domain} +maxkey.server.uri=${maxkey.server.name}/maxkey +#default.uri +maxkey.server.default.uri=${maxkey.server.uri}/maxkey/appList +maxkey.server.management.uri=${maxkey.server.name}:9521/maxkey-mgt/login +#InMemory 0 , Redis 2 +maxkey.server.persistence=0 +#identity +maxkey.identity.kafkasupport=false +#issuer name +maxkey.app.issuer=CN=ConSec,CN=COM,CN=SH + +############################################################################ +#Login configuration # +############################################################################ +#enable captcha +maxkey.login.captcha=true +#text or arithmetic +maxkey.login.captcha.type=text +#enable two factor,use one time password +maxkey.login.mfa=true +#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud +maxkey.login.mfa.type=TimeBasedOtpAuthn +#enable social sign on +maxkey.login.socialsignon=true +#social sign on providers +maxkey.login.socialsignon.providers=gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin +#Enable kerberos/SPNEGO +maxkey.login.kerberos=true +#wsFederation +maxkey.login.wsfederation=false +#remeberme +maxkey.login.remeberme=true +#validity +maxkey.login.remeberme.validity=0 +#to default application web site +maxkey.login.default.uri=appList +maxkey.ipaddress.whitelist=false +maxkey.notices.visible=false + ############################################################################ #ssl configuration # ############################################################################ @@ -32,11 +77,6 @@ server.ssl.enabled=true server.ssl.key-store-password=maxkey server.ssl.key-store-type=JKS -#encoding -#server.servlet.encoding.charset=UTF-8 -#server.servlet.encoding.enabled=true -#server.servlet.encoding.force=true - ############################################################################ #database configuration # supported database @@ -60,7 +100,6 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #spring.datasource.password=maxkey! #spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai #spring.datasource.driver-class-name=org.postgresql.Driver - #mybatis mybatis.dialect=mysql mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps, @@ -98,32 +137,6 @@ spring.mail.properties.mailotp.message.template={0} You Token is {1} , it validi spring.mail.properties.mailotp.message.type=html spring.mail.properties.mailotp.message.validity=300 -############################################################################ -#freemarker configuration # -############################################################################ -spring.freemarker.template-loader-path=classpath:/templates/views -spring.freemarker.cache=false -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.expose-request-attributes=false -spring.freemarker.expose-session-attributes=false -spring.freemarker.request-context-attribute=request -spring.freemarker.suffix=.ftl - -############################################################################ -#static resources configuration # -############################################################################ -spring.mvc.static-path-pattern=/static/** -spring.messages.basename=classpath:messages/message -spring.messages.encoding=UTF-8 - -############################################################################ -#Main.banner-mode configuration # -############################################################################ -spring.main.banner-mode=log -spring.main.allow-bean-definition-overriding=true - ############################################################################ #Spring Session for Cluster configuration # ############################################################################ @@ -157,60 +170,8 @@ spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.Str # partitioner #spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner -############################################################################ -#Management endpoints configuration # -############################################################################ -management.security.enabled=false -#management.endpoints.jmx.exposure.include=health,info -management.endpoints.web.exposure.include=metrics,health,info,env - -############################################################################ -#domain name configuration # -############################################################################ -maxkey.server.scheme=https -maxkey.server.basedomain=maxkey.top -maxkey.server.domain=sso.${maxkey.server.basedomain} -maxkey.server.name=${maxkey.server.scheme}://${maxkey.server.domain} -maxkey.server.uri=${maxkey.server.name}/maxkey -#default.uri -maxkey.server.default.uri=${maxkey.server.uri}/maxkey/appList -maxkey.server.management.uri=${maxkey.server.name}:9521/maxkey-mgt/login -#InMemory 0 , Redis 2 -maxkey.server.persistence=0 -#identity -maxkey.identity.kafkasupport=false - -maxkey.app.issuer=CN=ConSec,CN=COM,CN=SH -############################################################################ -#Login configuration # -############################################################################ -#enable captcha -maxkey.login.captcha=true -#text or arithmetic -maxkey.login.captcha.type=text -#enable two factor,use one time password -maxkey.login.mfa=true -#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud -maxkey.login.mfa.type=TimeBasedOtpAuthn -#enable social sign on -maxkey.login.socialsignon=true -#social sign on providers -maxkey.login.socialsignon.providers=gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin -#Enable kerberos/SPNEGO -maxkey.login.kerberos=true -#wsFederation -maxkey.login.wsfederation=false -#remeberme -maxkey.login.remeberme=true -#validity -maxkey.login.remeberme.validity=0 -#to default application web site -maxkey.login.default.uri=appList -maxkey.ipaddress.whitelist=false -maxkey.notices.visible=false - ############################################################################ -#Kerberos Login configuration # +#SMS Message Login configuration # #SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud # ############################################################################ #default @@ -240,30 +201,6 @@ maxkey.otp.keyuri.format.issuer=MaxKey maxkey.otp.keyuri.format.domain=${maxkey.server.domain} maxkey.otp.keyuri.format.period=30 -############################################################################ -#Kerberos Login configuration # -#short name of user domain must be in upper case,eg:MAXKEY # -############################################################################ -maxkey.support.kerberos.default.userdomain=MAXKEY -#short name of user domain must be in upper case,eg:MAXKEY.ORG -maxkey.support.kerberos.default.fulluserdomain=MAXKEY.ORG -#last 8Bit crypto for Kerberos web Authentication -maxkey.support.kerberos.default.crypto=846KZSzYq56M6d5o -#Kerberos Authentication server RUL -maxkey.support.kerberos.default.redirecturi=http://sso.maxkey.top/kerberos/authn/ -############################################################################ -#HTTPHEADER Login configuration # -############################################################################ -maxkey.support.httpheader.enable=false -maxkey.support.httpheader.headername=header-user -# iv-user is for IBM Security Access Manager -#config.httpheader.headername=iv-user - -############################################################################ -#BASIC Login support configuration # -############################################################################ -maxkey.support.basic.enable=false - ############################################################################ #LDAP Login support configuration # ############################################################################ @@ -282,6 +219,31 @@ maxkey.support.ldap.truststorepassword=maxkey #activedirectory effective maxkey.support.ldap.activedirectory.domain=MAXKEY.ORG +############################################################################ +#Kerberos Login configuration # +#short name of user domain must be in upper case,eg:MAXKEY # +############################################################################ +maxkey.support.kerberos.default.userdomain=MAXKEY +#short name of user domain must be in upper case,eg:MAXKEY.ORG +maxkey.support.kerberos.default.fulluserdomain=MAXKEY.ORG +#last 8Bit crypto for Kerberos web Authentication +maxkey.support.kerberos.default.crypto=846KZSzYq56M6d5o +#Kerberos Authentication server RUL +maxkey.support.kerberos.default.redirecturi=http://sso.maxkey.top/kerberos/authn/ + +############################################################################ +#HTTPHEADER Login configuration # +############################################################################ +maxkey.support.httpheader.enable=false +maxkey.support.httpheader.headername=header-user +# iv-user is for IBM Security Access Manager +#config.httpheader.headername=iv-user + +############################################################################ +#BASIC Login support configuration # +############################################################################ +maxkey.support.basic.enable=false + ############################################################################# #WsFederation Login support configuration #identifier: the identifer for the ADFS server @@ -429,6 +391,19 @@ maxkey.socialsignon.facebook.account.id=id maxkey.socialsignon.facebook.hidden=false maxkey.socialsignon.facebook.sortorder=8 +############################################################################ +#Management endpoints configuration # +############################################################################ +management.security.enabled=false +#management.endpoints.jmx.exposure.include=health,info +#management.endpoints.web.exposure.include=metrics,health,info,env +management.endpoints.web.exposure.include=* +management.endpoint.health.show-details=ALWAYS +#Spring Boot Admin Client +spring.application.name=maxkey +spring.boot.admin.client.url=http://127.0.0.1:9528 +management.health.redis.enabled: false + ############################################################################ #springfox.documentation.swagger.v2.path=/api-docs # #Swagger Configure Properties # @@ -436,4 +411,44 @@ maxkey.socialsignon.facebook.sortorder=8 maxkey.swagger.enable=true maxkey.swagger.title=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 maxkey.swagger.description=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 -maxkey.swagger.version=${application.formatted-version} \ No newline at end of file +maxkey.swagger.version=${application.formatted-version} + +############################################################################ +#freemarker configuration # +############################################################################ +spring.freemarker.template-loader-path=classpath:/templates/views +spring.freemarker.cache=false +spring.freemarker.charset=UTF-8 +spring.freemarker.check-template-location=true +spring.freemarker.content-type=text/html +spring.freemarker.expose-request-attributes=false +spring.freemarker.expose-session-attributes=false +spring.freemarker.request-context-attribute=request +spring.freemarker.suffix=.ftl + +############################################################################ +#static resources configuration # +############################################################################ +spring.mvc.static-path-pattern=/static/** +spring.messages.basename=classpath:messages/message +spring.messages.encoding=UTF-8 + +############################################################################ +#server servlet encoding configuration # +############################################################################ +#encoding +#server.servlet.encoding.charset=UTF-8 +#server.servlet.encoding.enabled=true +#server.servlet.encoding.force=true + +############################################################################ +#Servlet multipart configuration # +############################################################################ +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=4194304 + +############################################################################ +#Main.banner-mode configuration # +############################################################################ +spring.main.banner-mode=log +spring.main.allow-bean-definition-overriding=true diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties index 98d62eb55..1b01b33ba 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties +++ b/maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties @@ -22,5 +22,5 @@ application.formatted-version=v2.9.0 GA ############################################################################ #spring.profiles.active https/http; default https # ############################################################################ -spring.profiles.active=https +spring.profiles.active=http diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtConfig.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtConfig.java index 84cb1c5c0..ff9e3655e 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtConfig.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtConfig.java @@ -149,7 +149,7 @@ public class MaxKeyMgtConfig implements InitializingBean { * @throws SchedulerException */ @Bean(name = "schedulerJobs") - public Scheduler schedulerJobs( + public String schedulerJobs( SchedulerFactoryBean schedulerFactoryBean, GroupsService groupsService, @Value("${maxkey.job.cron.dynamicgroups}") String cronScheduleDynamicGroups @@ -158,7 +158,7 @@ public class MaxKeyMgtConfig implements InitializingBean { Scheduler scheduler = schedulerFactoryBean.getScheduler(); dynamicGroupsJob(scheduler,cronScheduleDynamicGroups,groupsService); - return scheduler; + return "schedulerJobs"; } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/DynamicGroupsJob.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/DynamicGroupsJob.java index 0cbb12fa2..973a33249 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/DynamicGroupsJob.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/DynamicGroupsJob.java @@ -17,6 +17,7 @@ package org.maxkey.jobs; +import java.io.Serializable; import java.util.List; import org.maxkey.entity.Groups; @@ -26,7 +27,14 @@ import org.quartz.JobExecutionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DynamicGroupsJob implements Job { +import com.fasterxml.jackson.annotation.JsonIgnore; + +public class DynamicGroupsJob implements Job , Serializable { + /** + * + */ + private static final long serialVersionUID = 8831626240807856084L; + final static Logger _logger = LoggerFactory.getLogger(DynamicGroupsJob.class); private static GroupsService groupsService = null; @@ -67,7 +75,6 @@ public class DynamicGroupsJob implements Job { jobStatus = JOBSTATUS.FINISHED; _logger.debug("DynamicGroupsJob is finished . " ); } - - + } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/resources/application-http.properties b/maxkey-webs/maxkey-web-mgt/src/main/resources/application-http.properties index c13653cc6..ca4761949 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/resources/application-http.properties +++ b/maxkey-webs/maxkey-web-mgt/src/main/resources/application-http.properties @@ -17,141 +17,8 @@ ############################################################################ #server port server.port=9527 -#web app context path +#server context path server.servlet.context-path=/maxkey-mgt -spring.servlet.multipart.enabled=true -spring.servlet.multipart.max-file-size=4194304 -#server.servlet.encoding.charset.from= -#server.servlet.encoding.charset= -#server.servlet.encoding.enabled= -#server.servlet.encoding.force= - -############################################################################ -#database configuration -# supported database -# mysql -# highgo -# postgresql -############################################################################ -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -#mysql -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -#highgo -#spring.datasource.username=highgo -#spring.datasource.password=High@123 -#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai -#spring.datasource.driver-class-name=com.highgo.jdbc.Driver -#postgresql -#spring.datasource.username=root -#spring.datasource.password=maxkey! -#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai -#spring.datasource.driver-class-name=org.postgresql.Driver - -#mybatis -mybatis.dialect=mysql -mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps, -mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml -mybatis.table-column-snowflake-datacenter-id=1 -mybatis.table-column-snowflake-machine-id=1 -mybatis.table-column-escape=false -mybatis.table-column-case=lowercase - -############################################################################ -#redis server configuration # -############################################################################ -#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 configuration # -############################################################################ -#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 - -############################################################################ -#freemarker configuration # -############################################################################ -spring.freemarker.template-loader-path=classpath:/templates/views -spring.freemarker.cache=false -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.expose-request-attributes=false -spring.freemarker.expose-session-attributes=false -spring.freemarker.request-context-attribute=request -spring.freemarker.suffix=.ftl -#spring.freemarker.settings.classic_compatible=true - -############################################################################ -#static resources configuration # -############################################################################ -spring.mvc.static-path-pattern=/static/** -spring.messages.basename=classpath:messages/message -spring.messages.encoding=UTF-8 - -############################################################################ -#Main.banner-mode configuration # -############################################################################ -spring.main.banner-mode=log -spring.main.allow-bean-definition-overriding=true - -############################################################################ -#Spring Session configuration # -############################################################################ -#Session store type. -spring.session.store-type=none -#spring.session.store-type=redis -# Session timeout. If a duration suffix is not specified, seconds is used. -#server.servlet.session.timeout=1800 -# Sessions flush mode. -#spring.session.redis.flush-mode=on_save -# Namespace for keys used to store sessions. -#spring.session.redis.namespace=spring:session - -############################################################################ -#Kafka for connectors configuration # -############################################################################ -spring.kafka.bootstrap-servers=localhost:9092 -# retries -spring.kafka.producer.retries=0 -# acks -spring.kafka.producer.acks=1 -# batch-size -spring.kafka.producer.batch-size=16384 -# linger.ms -spring.kafka.producer.properties.linger.ms=0 -# buffer-memory -spring.kafka.producer.buffer-memory = 33554432 -# serializer -spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer -spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer -# partitioner -# spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner - -############################################################################ -#Management endpoints configuration # -############################################################################ -#management.server.port=9522 -#management.server.servlet.context-path=/maxkey-mgt-actuate -#management.endpoints.enabled-by-default=false -management.security.enabled=false -#management.endpoints.jmx.exposure.include=health,info -management.endpoints.web.exposure.include=metrics,health,info,env,beans ############################################################################ #domain name configuration # @@ -194,6 +61,95 @@ maxkey.login.default.uri=appList #ipaddress whitelist maxkey.ipaddress.whitelist=false +############################################################################ +#database configuration +# supported database +# mysql +# highgo +# postgresql +############################################################################ +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +#mysql +spring.datasource.username=root +spring.datasource.password=maxkey +spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8&serverTimezone=UTC +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +#highgo +#spring.datasource.username=highgo +#spring.datasource.password=High@123 +#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai +#spring.datasource.driver-class-name=com.highgo.jdbc.Driver +#postgresql +#spring.datasource.username=root +#spring.datasource.password=maxkey! +#spring.datasource.url=jdbc:postgresql://localhost/maxkey?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai +#spring.datasource.driver-class-name=org.postgresql.Driver +#mybatis +mybatis.dialect=mysql +mybatis.type-aliases-package=org.maxkey.entity,org.maxkey.entity.apps, +mybatis.mapper-locations=classpath*:/org/maxkey/persistence/mapper/xml/${mybatis.dialect}/*.xml +mybatis.table-column-snowflake-datacenter-id=1 +mybatis.table-column-snowflake-machine-id=1 +mybatis.table-column-escape=false +mybatis.table-column-case=lowercase + +############################################################################ +#redis server configuration # +############################################################################ +#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 configuration # +############################################################################ +#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 + +############################################################################ +#Spring Session configuration # +############################################################################ +#Session store type. +spring.session.store-type=none +#spring.session.store-type=redis +# Session timeout. If a duration suffix is not specified, seconds is used. +#server.servlet.session.timeout=1800 +# Sessions flush mode. +#spring.session.redis.flush-mode=on_save +# Namespace for keys used to store sessions. +#spring.session.redis.namespace=spring:session + +############################################################################ +#Kafka for connectors configuration # +############################################################################ +spring.kafka.bootstrap-servers=localhost:9092 +# retries +spring.kafka.producer.retries=0 +# acks +spring.kafka.producer.acks=1 +# batch-size +spring.kafka.producer.batch-size=16384 +# linger.ms +spring.kafka.producer.properties.linger.ms=0 +# buffer-memory +spring.kafka.producer.buffer-memory = 33554432 +# serializer +spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer +spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer +# partitioner +# spring.kafka.producer.properties.partitioner.class=com.felix.kafka.producer.CustomizePartitioner + ############################################################################# #SAML V2.0 configuration # ############################################################################# @@ -231,3 +187,65 @@ maxkey.oidc.metadata.userinfoEndpoint=${maxkey.server.name}/maxkey/api/connect/u #one hour for refresh dynamic groups maxkey.job.cron.dynamicgroups=0 0 0/1 * * ? maxkey.job.cron.enable=true + +############################################################################ +#Management endpoints configuration # +############################################################################ +management.security.enabled=false +#management.endpoints.jmx.exposure.include=health,info +#management.endpoints.web.exposure.include=metrics,health,info,env +management.endpoints.web.exposure.include=* +management.endpoint.health.show-details=ALWAYS +#Spring Boot Admin Client +spring.application.name=maxkey +spring.boot.admin.client.url=http://127.0.0.1:9528 +management.health.redis.enabled: false + +############################################################################ +#springfox.documentation.swagger.v2.path=/api-docs # +#Swagger Configure Properties # +############################################################################ +maxkey.swagger.enable=true +maxkey.swagger.title=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 +maxkey.swagger.description=MaxKey\u5355\u70b9\u767b\u5f55\u8ba4\u8bc1\u7cfb\u7edfapi\u6587\u6863 +maxkey.swagger.version=${application.formatted-version} + +############################################################################ +#freemarker configuration # +############################################################################ +spring.freemarker.template-loader-path=classpath:/templates/views +spring.freemarker.cache=false +spring.freemarker.charset=UTF-8 +spring.freemarker.check-template-location=true +spring.freemarker.content-type=text/html +spring.freemarker.expose-request-attributes=false +spring.freemarker.expose-session-attributes=false +spring.freemarker.request-context-attribute=request +spring.freemarker.suffix=.ftl + +############################################################################ +#static resources configuration # +############################################################################ +spring.mvc.static-path-pattern=/static/** +spring.messages.basename=classpath:messages/message +spring.messages.encoding=UTF-8 + +############################################################################ +#server servlet encoding configuration # +############################################################################ +#encoding +#server.servlet.encoding.charset=UTF-8 +#server.servlet.encoding.enabled=true +#server.servlet.encoding.force=true + +############################################################################ +#Servlet multipart configuration # +############################################################################ +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=4194304 + +############################################################################ +#Main.banner-mode configuration # +############################################################################ +spring.main.banner-mode=log +spring.main.allow-bean-definition-overriding=true