Add samples to build

Issue gh-610
This commit is contained in:
Josh Cummings
2022-01-19 16:30:51 -07:00
parent b653e38da1
commit 0c087d6b81
8 changed files with 30 additions and 17 deletions

View File

@@ -1,20 +1,25 @@
plugins {
id 'io.spring.convention.spring-module'
id "org.gretty"
id 'war'
}
dependencies {
management platform(project(":spring-ldap-dependencies"))
implementation project(':spring-ldap-test'),
'javax.servlet:jstl:1.2',
"org.springframework:spring-context",
"org.springframework:spring-webmvc",
"org.springframework.data:spring-data-commons",
"commons-lang:commons-lang"
compileOnly "javax.servlet:servlet-api:2.5"
runtimeOnly 'ch.qos.logback:logback-classic:1.0.13'
testImplementation "com.unboundid:unboundid-ldapsdk"
testImplementation platform('org.junit:junit-bom')
testImplementation "org.junit.vintage:junit-vintage-engine"
testImplementation "org.springframework:spring-test",
"junit:junit",
"org.assertj:assertj-core"

View File

@@ -27,7 +27,7 @@
<beans profile="default">
<!-- Populates the LDAP server with initial data -->
<bean class="org.springframework.ldap.test.LdifPopulator" depends-on="embeddedLdapServer">
<bean class="org.springframework.ldap.test.unboundid.LdifPopulator" depends-on="embeddedLdapServer">
<property name="contextSource" ref="contextSource" />
<property name="resource" value="classpath:/setup_data.ldif" />
<property name="base" value="${sample.ldap.base}" />

View File

@@ -16,7 +16,7 @@
<!-- Populates the LDAP server with initial data -->
<bean class="org.springframework.ldap.test.LdifPopulator" depends-on="embeddedLdapServer">
<bean class="org.springframework.ldap.test.unboundid.LdifPopulator" depends-on="embeddedLdapServer">
<property name="contextSource" ref="contextSource" />
<property name="resource" value="classpath:/setup_data.ldif" />
<property name="base" value="${sample.ldap.base}" />
@@ -28,8 +28,8 @@
This is for test and demo purposes only - EmbeddedLdapServerFactoryBean launches an in-process
LDAP server.
-->
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="example"/>
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.unboundid.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="jayway"/>
<property name="partitionSuffix" value="${sample.ldap.base}" />
<property name="port" value="18880" />
</bean>

View File

@@ -1,19 +1,25 @@
plugins {
id 'io.spring.convention.spring-module'
id "org.gretty"
id 'war'
}
dependencies {
management platform(project(":spring-ldap-dependencies"))
implementation project(':spring-ldap-test'),
'javax.servlet:jstl:1.2',
"org.springframework:spring-context",
"org.springframework:spring-webmvc",
"org.springframework.data:spring-data-commons"
"commons-lang:commons-lang"
compileOnly "javax.servlet:servlet-api:2.5"
runtimeOnly 'ch.qos.logback:logback-classic:1.0.13'
testImplementation "com.unboundid:unboundid-ldapsdk"
testImplementation platform('org.junit:junit-bom')
testImplementation "org.junit.vintage:junit-vintage-engine"
testImplementation "org.springframework:spring-test",
"junit:junit",
"org.assertj:assertj-core"

View File

@@ -1,6 +1,12 @@
package org.springframework.ldap.samples.plain.web;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import javax.naming.Name;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ldap.core.DirContextOperations;
import org.springframework.ldap.samples.plain.dao.PersonDao;
@@ -14,10 +20,6 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.naming.Name;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
/**
* Default controller.
*

View File

@@ -27,7 +27,7 @@
<beans profile="default">
<!-- Populates the LDAP server with initial data -->
<bean class="org.springframework.ldap.test.LdifPopulator" depends-on="embeddedLdapServer">
<bean id="ldifPopulator" class="org.springframework.ldap.test.LdifPopulator" depends-on="embeddedLdapServer">
<property name="contextSource" ref="contextSource" />
<property name="resource" value="classpath:/setup_data.ldif" />
<property name="base" value="${sample.ldap.base}" />
@@ -39,8 +39,8 @@
This is for test and demo purposes only - EmbeddedLdapServerFactoryBean launches an in-process
LDAP server.
-->
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="example"/>
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.unboundid.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="jayway"/>
<property name="partitionSuffix" value="${sample.ldap.base}" />
<property name="port" value="18880" />
</bean>

View File

@@ -27,8 +27,8 @@
This is for test and demo purposes only - EmbeddedLdapServerFactoryBean launches an in-process
LDAP server.
-->
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="example"/>
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.unboundid.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="jayway"/>
<property name="partitionSuffix" value="${sample.ldap.base}" />
<property name="port" value="18880" />
</bean>

View File

@@ -35,8 +35,8 @@ include 'test/integration-tests'
include 'test/integration-tests-openldap'
include 'test/integration-tests-sunone'
include 'test/integration-tests-ad'
//include 'samples/plain'
//include 'samples/odm'
include 'samples/plain'
include 'samples/odm'
rootProject.children.each { p->