Add samples to build
Issue gh-610
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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}" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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->
|
||||
|
||||
Reference in New Issue
Block a user