Skip to content

Commit 29e3437

Browse files
authored
Nbosecker merge (eugenp#1989)
* Solr w Apache SolrJ * Solr w Apache SolrJ * updated test names and moved add to @before method * create apache-solrj module, moved code from spring-data-solr * More examples for indexing,delete,and query for solrj * More examples for indexing,delete,and query for solrj * Jackson Map Serialize/Deserialize * Jackson Map Serialize/Deserialize * Jackson version update * keydeserializer code added * keydeserializer code added * remove explicit types from map instantion * one objectmapper per class * refactor to spring-rest-simple module * Fix spring-rest-simple
1 parent 4b2e7a5 commit 29e3437

34 files changed

Lines changed: 1247 additions & 122 deletions

‎pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
<module>spring-rest-angular</module>
175175
<module>spring-rest-docs</module>
176176
<module>spring-rest</module>
177+
<module>spring-rest-simple</module>
177178
<module>spring-security-cache-control</module>
178179
<module>spring-security-client/spring-security-jsp-authentication</module>
179180
<module>spring-security-client/spring-security-jsp-authorize</module>

‎spring-rest-simple/pom.xml‎

Lines changed: 370 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,370 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.baeldung</groupId>
5+
<artifactId>spring-rest-simple</artifactId>
6+
<version>0.1-SNAPSHOT</version>
7+
<name>spring-rest-simple</name>
8+
<packaging>war</packaging>
9+
10+
<parent>
11+
<groupId>org.springframework.boot</groupId>
12+
<artifactId>spring-boot-starter-parent</artifactId>
13+
<version>1.4.3.RELEASE</version>
14+
</parent>
15+
16+
<dependencies>
17+
18+
<!-- Spring Boot Dependencies -->
19+
20+
<dependency>
21+
<groupId>org.springframework.boot</groupId>
22+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
23+
</dependency>
24+
<dependency>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-starter-actuator</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-devtools</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-test</artifactId>
35+
</dependency>
36+
37+
<!-- Spring -->
38+
39+
<dependency>
40+
<groupId>org.springframework</groupId>
41+
<artifactId>spring-web</artifactId>
42+
<exclusions>
43+
<exclusion>
44+
<artifactId>commons-logging</artifactId>
45+
<groupId>commons-logging</groupId>
46+
</exclusion>
47+
</exclusions>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.springframework</groupId>
51+
<artifactId>spring-webmvc</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.springframework</groupId>
55+
<artifactId>spring-oxm</artifactId>
56+
</dependency>
57+
58+
<dependency>
59+
<groupId>commons-fileupload</groupId>
60+
<artifactId>commons-fileupload</artifactId>
61+
<version>${commons-fileupload.version}</version>
62+
</dependency>
63+
<!-- web -->
64+
65+
<dependency>
66+
<groupId>javax.servlet</groupId>
67+
<artifactId>javax.servlet-api</artifactId>
68+
<scope>provided</scope>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>javax.servlet</groupId>
73+
<artifactId>jstl</artifactId>
74+
<scope>runtime</scope>
75+
</dependency>
76+
77+
<!-- marshalling -->
78+
79+
<dependency>
80+
<groupId>com.fasterxml.jackson.core</groupId>
81+
<artifactId>jackson-databind</artifactId>
82+
</dependency>
83+
84+
<dependency>
85+
<groupId>com.fasterxml.jackson.dataformat</groupId>
86+
<artifactId>jackson-dataformat-xml</artifactId>
87+
</dependency>
88+
89+
<dependency>
90+
<groupId>com.thoughtworks.xstream</groupId>
91+
<artifactId>xstream</artifactId>
92+
<version>${xstream.version}</version>
93+
</dependency>
94+
95+
<!-- util -->
96+
97+
<dependency>
98+
<groupId>com.google.guava</groupId>
99+
<artifactId>guava</artifactId>
100+
<version>${guava.version}</version>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>org.apache.commons</groupId>
105+
<artifactId>commons-lang3</artifactId>
106+
<version>${commons-lang3.version}</version>
107+
</dependency>
108+
109+
<!-- logging -->
110+
111+
<dependency>
112+
<groupId>org.slf4j</groupId>
113+
<artifactId>slf4j-api</artifactId>
114+
</dependency>
115+
<dependency>
116+
<groupId>ch.qos.logback</groupId>
117+
<artifactId>logback-classic</artifactId>
118+
<!-- <scope>runtime</scope> -->
119+
</dependency>
120+
<dependency>
121+
<groupId>org.slf4j</groupId>
122+
<artifactId>jcl-over-slf4j</artifactId>
123+
<!-- <scope>runtime</scope> --> <!-- some spring dependencies need to compile against jcl -->
124+
</dependency>
125+
126+
<!-- okhttp -->
127+
128+
<dependency>
129+
<groupId>com.squareup.okhttp3</groupId>
130+
<artifactId>okhttp</artifactId>
131+
<version>${com.squareup.okhttp3.version}</version>
132+
</dependency>
133+
134+
<!-- test scoped -->
135+
136+
<dependency>
137+
<groupId>junit</groupId>
138+
<artifactId>junit</artifactId>
139+
<scope>test</scope>
140+
</dependency>
141+
142+
<dependency>
143+
<groupId>org.hamcrest</groupId>
144+
<artifactId>hamcrest-core</artifactId>
145+
<scope>test</scope>
146+
</dependency>
147+
<dependency>
148+
<groupId>org.hamcrest</groupId>
149+
<artifactId>hamcrest-library</artifactId>
150+
<scope>test</scope>
151+
</dependency>
152+
153+
<dependency>
154+
<groupId>org.mockito</groupId>
155+
<artifactId>mockito-core</artifactId>
156+
<scope>test</scope>
157+
</dependency>
158+
159+
<dependency>
160+
<groupId>org.springframework</groupId>
161+
<artifactId>spring-test</artifactId>
162+
</dependency>
163+
164+
<dependency>
165+
<groupId>com.jayway.restassured</groupId>
166+
<artifactId>rest-assured</artifactId>
167+
<version>${rest-assured.version}</version>
168+
</dependency>
169+
170+
<!-- -->
171+
<dependency>
172+
<groupId>com.google.protobuf</groupId>
173+
<artifactId>protobuf-java</artifactId>
174+
<version>${protobuf-java.version}</version>
175+
</dependency>
176+
<dependency>
177+
<groupId>com.googlecode.protobuf-java-format</groupId>
178+
<artifactId>protobuf-java-format</artifactId>
179+
<version>${protobuf-java-format.version}</version>
180+
</dependency>
181+
182+
<dependency>
183+
<groupId>com.esotericsoftware</groupId>
184+
<artifactId>kryo</artifactId>
185+
<version>${kryo.version}</version>
186+
</dependency>
187+
188+
<dependency>
189+
<groupId>com.jayway.jsonpath</groupId>
190+
<artifactId>json-path</artifactId>
191+
</dependency>
192+
193+
</dependencies>
194+
195+
<build>
196+
<finalName>spring-rest</finalName>
197+
<resources>
198+
<resource>
199+
<directory>src/main/resources</directory>
200+
<filtering>true</filtering>
201+
</resource>
202+
</resources>
203+
204+
<plugins>
205+
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-compiler-plugin</artifactId>
209+
<configuration>
210+
<source>1.8</source>
211+
<target>1.8</target>
212+
</configuration>
213+
</plugin>
214+
215+
<plugin>
216+
<groupId>org.apache.maven.plugins</groupId>
217+
<artifactId>maven-war-plugin</artifactId>
218+
</plugin>
219+
220+
<plugin>
221+
<groupId>org.apache.maven.plugins</groupId>
222+
<artifactId>maven-surefire-plugin</artifactId>
223+
<configuration>
224+
<forkCount>3</forkCount>
225+
<reuseForks>true</reuseForks>
226+
<excludes>
227+
<exclude>**/*IntegrationTest.java</exclude>
228+
<exclude>**/*LongRunningUnitTest.java</exclude>
229+
<exclude>**/*ManualTest.java</exclude>
230+
<exclude>**/JdbcTest.java</exclude>
231+
<exclude>**/*LiveTest.java</exclude>
232+
</excludes>
233+
<testFailureIgnore>true</testFailureIgnore>
234+
</configuration>
235+
</plugin>
236+
237+
<plugin>
238+
<groupId>org.codehaus.cargo</groupId>
239+
<artifactId>cargo-maven2-plugin</artifactId>
240+
<version>${cargo-maven2-plugin.version}</version>
241+
<configuration>
242+
<wait>true</wait>
243+
<container>
244+
<containerId>tomcat8x</containerId>
245+
<type>embedded</type>
246+
<systemProperties>
247+
<!-- <provPersistenceTarget>cargo</provPersistenceTarget> -->
248+
</systemProperties>
249+
</container>
250+
<configuration>
251+
<properties>
252+
<cargo.servlet.port>8082</cargo.servlet.port>
253+
</properties>
254+
</configuration>
255+
</configuration>
256+
</plugin>
257+
258+
</plugins>
259+
260+
</build>
261+
262+
<profiles>
263+
264+
<profile>
265+
<id>integration</id>
266+
<build>
267+
<plugins>
268+
<plugin>
269+
<groupId>org.apache.maven.plugins</groupId>
270+
<artifactId>maven-surefire-plugin</artifactId>
271+
<executions>
272+
<execution>
273+
<phase>integration-test</phase>
274+
<goals>
275+
<goal>test</goal>
276+
</goals>
277+
<configuration>
278+
<excludes>
279+
<exclude>none</exclude>
280+
</excludes>
281+
<includes>
282+
<include>**/*IntegrationTest.java</include>
283+
</includes>
284+
</configuration>
285+
</execution>
286+
</executions>
287+
</plugin>
288+
289+
</plugins>
290+
</build>
291+
</profile>
292+
293+
<profile>
294+
<id>live</id>
295+
<build>
296+
<plugins>
297+
<plugin>
298+
<groupId>org.codehaus.cargo</groupId>
299+
<artifactId>cargo-maven2-plugin</artifactId>
300+
<executions>
301+
<execution>
302+
<id>start-server</id>
303+
<phase>pre-integration-test</phase>
304+
<goals>
305+
<goal>start</goal>
306+
</goals>
307+
</execution>
308+
<execution>
309+
<id>stop-server</id>
310+
<phase>post-integration-test</phase>
311+
<goals>
312+
<goal>stop</goal>
313+
</goals>
314+
</execution>
315+
</executions>
316+
</plugin>
317+
318+
<plugin>
319+
<groupId>org.apache.maven.plugins</groupId>
320+
<artifactId>maven-surefire-plugin</artifactId>
321+
<executions>
322+
<execution>
323+
<phase>integration-test</phase>
324+
<goals>
325+
<goal>test</goal>
326+
</goals>
327+
<configuration>
328+
<excludes>
329+
<exclude>none</exclude>
330+
</excludes>
331+
<includes>
332+
<include>**/*LiveTest.java</include>
333+
</includes>
334+
<systemPropertyVariables>
335+
<webTarget>cargo</webTarget>
336+
</systemPropertyVariables>
337+
</configuration>
338+
</execution>
339+
</executions>
340+
</plugin>
341+
342+
</plugins>
343+
</build>
344+
</profile>
345+
346+
</profiles>
347+
348+
<properties>
349+
<commons-fileupload.version>1.3.2</commons-fileupload.version>
350+
<kryo.version>4.0.0</kryo.version>
351+
<protobuf-java-format.version>1.4</protobuf-java-format.version>
352+
<protobuf-java.version>3.1.0</protobuf-java.version>
353+
<commons-lang3.version>3.5</commons-lang3.version>
354+
<xstream.version>1.4.9</xstream.version>
355+
356+
<!-- util -->
357+
<guava.version>20.0</guava.version>
358+
<rest-assured.version>2.9.0</rest-assured.version>
359+
360+
<!-- Maven plugins -->
361+
<cargo-maven2-plugin.version>1.6.0</cargo-maven2-plugin.version>
362+
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
363+
364+
<!-- okhttp -->
365+
<com.squareup.okhttp3.version>3.4.1</com.squareup.okhttp3.version>
366+
367+
<json.path.version>2.2.0</json.path.version>
368+
</properties>
369+
370+
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.baeldung.config;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5+
import org.springframework.context.annotation.ComponentScan;
6+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
7+
8+
@EnableAutoConfiguration
9+
@ComponentScan("org.baeldung")
10+
public class Application extends WebMvcConfigurerAdapter {
11+
12+
public static void main(final String[] args) {
13+
SpringApplication.run(Application.class, args);
14+
}
15+
16+
}

0 commit comments

Comments
 (0)