spring boot init
spring boot init
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
encoding//src/main/resources/templates/views/authorize/formbased_netease_163email_sso_submint.ftl=UTF-8
|
||||
encoding//src/main/resources/templates/views/authorize/formbased_redirect_post_submint.ftl=UTF-8
|
||||
encoding//src/main/resources/templates/views/profile/myProfile.ftl=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
||||
@@ -5,9 +5,24 @@
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
|
||||
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-core/maxkey-core">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-dao/maxkey-dao">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-jose-jwt/maxkey-jose-jwt">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-client-sdk/maxkey-client-sdk">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-authentications/maxkey-authentications">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-protocol-authorize/maxkey-protocol-authorize">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-protocol-cas/maxkey-protocol-cas">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
@@ -29,23 +44,8 @@
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-protocol-oauth-2.0/maxkey-protocol-oauth-2.0">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-protocol-authorize/maxkey-protocol-authorize">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-protocol-saml-2.0/maxkey-protocol-saml-2.0">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-dao/maxkey-dao">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-core/maxkey-core">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-jose-jwt/maxkey-jose-jwt">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/maxkey-client-sdk/maxkey-client-sdk">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
|
||||
@@ -21,10 +21,7 @@ dependencies {
|
||||
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
|
||||
|
||||
//local jars
|
||||
compile fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
|
||||
|
||||
|
||||
compile project(":maxkey-core")
|
||||
compile project(":maxkey-dao")
|
||||
compile project(":maxkey-jose-jwt")
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.maxkey;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
@SpringBootApplication
|
||||
public class MaxKeyApplication extends SpringBootServletInitializer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MaxKeyApplication.class, args);
|
||||
}
|
||||
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(MaxKeyApplication.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.maxkey;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@Configuration
|
||||
@ImportResource(locations={"classpath:spring/maxkey.xml"})
|
||||
public class MaxKeyConfig {
|
||||
|
||||
}
|
||||
@@ -79,11 +79,6 @@ public class AppListController{
|
||||
WebContext.setAttribute(app.getId(), app.getIcon());
|
||||
}
|
||||
|
||||
if(appList.size()%5>0){
|
||||
for(int i=0;i<=appList.size()%5;i++){
|
||||
appList.add(new UserApplications());
|
||||
}
|
||||
}
|
||||
return appList;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -54,7 +54,7 @@ public class OneTimePasswordController {
|
||||
|
||||
@RequestMapping(value={"/timebased"})
|
||||
public ModelAndView timebased(){
|
||||
ModelAndView modelAndView=new ModelAndView("otp/timeBased");
|
||||
ModelAndView modelAndView=new ModelAndView("safe/timeBased");
|
||||
UserInfo userInfo=WebContext.getUserInfo();
|
||||
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
|
||||
timeBasedKeyUriFormat.setSecret(sharedSecret);
|
||||
@@ -84,7 +84,7 @@ public class OneTimePasswordController {
|
||||
|
||||
@RequestMapping(value={"/counterbased"})
|
||||
public ModelAndView counterbased(){
|
||||
ModelAndView modelAndView=new ModelAndView("otp/counterBased");
|
||||
ModelAndView modelAndView=new ModelAndView("safe/counterBased");
|
||||
UserInfo userInfo=WebContext.getUserInfo();
|
||||
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
|
||||
counterBasedKeyUriFormat.setSecret(sharedSecret);
|
||||
@@ -117,7 +117,7 @@ public class OneTimePasswordController {
|
||||
|
||||
@RequestMapping(value={"/hotp"})
|
||||
public ModelAndView hotp(){
|
||||
ModelAndView modelAndView=new ModelAndView("otp/hotp");
|
||||
ModelAndView modelAndView=new ModelAndView("safe/hotp");
|
||||
UserInfo userInfo=WebContext.getUserInfo();
|
||||
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
|
||||
hotpKeyUriFormat.setSecret(sharedSecret);
|
||||
|
||||
@@ -67,9 +67,9 @@ public class LoginEndpoint {
|
||||
@Qualifier("userInfoService")
|
||||
UserInfoService userInfoService;
|
||||
|
||||
@Autowired
|
||||
/*@Autowired
|
||||
@Qualifier("wsFederationService")
|
||||
WsFederationService wsFederationService;
|
||||
WsFederationService wsFederationService;*/
|
||||
|
||||
@Autowired
|
||||
@Qualifier("authenticationProvider")
|
||||
@@ -117,7 +117,7 @@ public class LoginEndpoint {
|
||||
if(applicationConfig.getLoginConfig().isWsFederation()&&
|
||||
StringUtils.isNotEmpty(wsFederationWA) &&
|
||||
wsFederationWA.equalsIgnoreCase(WsFederationConstants.WSIGNIN)){
|
||||
isAuthenticated=wsFederationService.login(wsFederationWA,wsFederationWResult,request);
|
||||
//isAuthenticated=wsFederationService.login(wsFederationWA,wsFederationWResult,request);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#server config
|
||||
#spring.profiles.active=dev
|
||||
#server port
|
||||
server.port=80
|
||||
#web app context path
|
||||
server.servlet.context-path=/maxkey
|
||||
|
||||
#for freemarker
|
||||
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
|
||||
spring.mvc.static-path-pattern=/static/**
|
||||
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
@@ -5,22 +5,16 @@
|
||||
<Console name="consolePrint" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss,SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<!--
|
||||
<File name="File" fileName="logs/PipeLineRunner.log">
|
||||
<PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss,SSS} [%t] %-5level %logger{36} - %msg%n" />
|
||||
</File>
|
||||
-->
|
||||
|
||||
<!-- 输出到文件,按天或者超过80MB分割 -->
|
||||
<RollingFile name="RollingFile" fileName="${catalina.home}/logs/maxkey.log" filePattern="${catalina.home}/logs/$${date:yyyy-MM}/maxkey-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<!-- 输出到文件,按天或者超过250MB分割 每天进行归档yyyy-MM-dd -->
|
||||
<RollingFile name="RollingFile" fileName="${catalina.home}/logs/maxkey.log" filePattern="${catalina.home}/logs/$${date:yyyy-MM-dd}/maxkey-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<!-- 需要记录的级别 -->
|
||||
<!-- <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY" /> -->
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS}:%4p %t (%F:%L) - %m%n" />
|
||||
<Policies>
|
||||
<OnStartupTriggeringPolicy />
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="512 MB" />
|
||||
<!-- <SizeBasedTriggeringPolicy size="80 MB" /> -->
|
||||
<SizeBasedTriggeringPolicy size="250 MB" />
|
||||
</Policies>
|
||||
</RollingFile>
|
||||
</appenders>
|
||||
|
||||
+3
-4
@@ -26,11 +26,10 @@
|
||||
<import resource="maxkey-support-kerberos.xml"/>
|
||||
|
||||
<import resource="maxkey-support-social.xml"/>
|
||||
|
||||
<import resource="maxkey-support-wsfederation.xml"/>
|
||||
|
||||
<import resource="maxkey-support-cas.xml"/>
|
||||
<!--
|
||||
<import resource="maxkey-support-wsfederation.xml"/>
|
||||
|
||||
|
||||
<import resource="maxkey-support-jwt.xml"/>
|
||||
-->
|
||||
|
||||
+3
-3
@@ -108,9 +108,9 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- View Resolver -->
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/views/" p:suffix=".jsp" p:order="2" />
|
||||
|
||||
<!-- View Resolver
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/templates/" p:suffix=".jsp" p:order="2" />
|
||||
-->
|
||||
<!-- upload file support -->
|
||||
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="maxUploadSize" value="4194304" />
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user