Commit e3686e2f authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

15: de-boot core library

Task-Url: #15
parent 117acaca
plugins {
id 'java-library'
id 'org.springframework.boot' version "2.3.4.RELEASE"
id 'io.spring.dependency-management' version "1.0.8.RELEASE"
}
......@@ -19,6 +18,9 @@ allprojects {
springPac4jVersion = "5.1.0"
webmvcPac4jVersion = "4.0.1"
pac4jVersion = "4.1.0"
lombokVersion = "1.18.14"
springVersion = "5.2.9.RELEASE"
servletApiVersion = "4.0.1"
librarySets = [
commonTest: [
......@@ -36,7 +38,6 @@ allprojects {
}
subprojects {
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
apply plugin: 'maven-publish'
......@@ -125,7 +126,3 @@ subprojects {
}
}
}
bootJar {
enabled = false
}
......@@ -10,9 +10,12 @@ dependencies {
api "org.pac4j:spring-webmvc-pac4j:$webmvcPac4jVersion"
api "org.pac4j:pac4j-saml:$pac4jVersion"
api "org.pac4j:pac4j-http:$pac4jVersion"
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
//implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "org.springframework:spring-webmvc:$springVersion"
implementation "javax.servlet:javax.servlet-api:$servletApiVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
testImplementation librarySets.commonTest
}
......
......@@ -17,9 +17,6 @@ import org.pac4j.saml.client.SAML2Client;
import org.pac4j.saml.config.SAML2Configuration;
import org.pac4j.springframework.annotation.AnnotationConfig;
import org.pac4j.springframework.component.ComponentConfig;
import org.pac4j.springframework.security.profile.SpringSecurityProfileManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......@@ -46,7 +43,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
@Configuration
@ComponentScan
@ConfigurationProperties(prefix = "auth")
//@ConfigurationProperties(prefix = "auth")
@Import({ComponentConfig.class, AnnotationConfig.class})
public class SecurityConfig {
private final LocalSecurity local = new LocalSecurity();
......@@ -54,7 +51,7 @@ public class SecurityConfig {
private String salt;
private String roleHierarchy;
private final List<RoleDefinition> roleDefinitions;
private List<RoleDefinition> roleDefinitions;
private String baseUrl = "http://localhost:8080";
private String defaultLoginUrl = null;
private String defaultLogoutUrl = null;
......
plugins {
id 'war'
id 'org.springframework.boot' version "2.3.4.RELEASE"
}
ext {
tilesVersion = "3.0.8"
jspApiVersion = "2.3.3"
}
......
......@@ -5,10 +5,7 @@ import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import eu.dariah.de.dariahsp.config.SecurityConfig;
import eu.dariah.de.dariahsp.config.web.AuthInfoConfigurer;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
......@@ -16,14 +13,13 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
@Configuration
@ConfigurationProperties
@Import({SecurityConfig.class, AuthInfoConfigurer.class})
public class SampleConfig {
private String contextPath = "/";
private String contextPath = "";
@Bean
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> webServerFactoryCustomizer() {
log.info("Web server context path set to {}", contextPath);
log.info("Web server context path set to {}", contextPath.isEmpty() ? "/" : contextPath);
return factory -> factory.setContextPath(contextPath);
}
}
......@@ -5,15 +5,16 @@ plugins {
ext {
tilesVersion = "3.0.8"
jspApiVersion = "2.3.3"
jstlVersion = "1.2"
}
dependencies {
implementation project(':dariahsp-core')
implementation "org.apache.tiles:tiles-core:$tilesVersion"
implementation "org.apache.tiles:tiles-jsp:$tilesVersion"
implementation "org.apache.tiles:tiles-api:$tilesVersion"
implementation "javax.servlet:jstl"
providedCompile "javax.servlet:javax.servlet-api"
//implementation "org.apache.tiles:tiles-core:$tilesVersion"
//implementation "org.apache.tiles:tiles-jsp:$tilesVersion"
//implementation "org.apache.tiles:tiles-api:$tilesVersion"
implementation "javax.servlet:jstl:$jstlVersion"
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api:$jspApiVersion"
/*compile 'de.unibamberg.minf.core:core-web:5.1.2-RELEASE'
compile 'org.springframework:spring-context:4.3.6.RELEASE'
......@@ -31,12 +32,4 @@ dependencies {
providedCompile 'javax.servlet.jsp:jsp-api:2.2'*/
}
description = 'dariahsp - sample web application'
bootJar {
enabled = false
}
bootWar {
enabled = false
}
\ No newline at end of file
description = 'dariahsp - sample web application'
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment