Skip to content

Commit 114bf97

Browse files
author
eugenp
committed
persistence work and small maven fix
1 parent 81ebbeb commit 114bf97

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

spring-security-oauth/pom.xml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
<version>${org.springframework.security.version}</version>
2828
</dependency>
2929
<dependency>
30-
<groupId>org.springframework.security.oauth</groupId>
31-
<artifactId>spring-security-oauth2</artifactId>
32-
<version>2.0.6.RELEASE</version>
33-
</dependency>
30+
<groupId>org.springframework.security.oauth</groupId>
31+
<artifactId>spring-security-oauth2</artifactId>
32+
<version>2.0.6.RELEASE</version>
33+
</dependency>
3434

3535
<!-- Spring -->
3636

@@ -86,7 +86,7 @@
8686
<artifactId>spring-webmvc</artifactId>
8787
<version>${org.springframework.version}</version>
8888
</dependency>
89-
89+
9090
<!-- web -->
9191

9292
<dependency>
@@ -156,14 +156,14 @@
156156
<scope>runtime</scope>
157157
</dependency>
158158

159-
<!-- apache mahout -->
160-
159+
<!-- apache mahout -->
160+
161161
<dependency>
162-
<groupId>org.apache.mahout</groupId>
163-
<artifactId>mahout-core</artifactId>
164-
<version>0.9</version>
162+
<groupId>org.apache.mahout</groupId>
163+
<artifactId>mahout-core</artifactId>
164+
<version>0.9</version>
165165
</dependency>
166-
166+
167167
<!-- marshalling -->
168168

169169
<dependency>
@@ -287,13 +287,17 @@
287287
<groupId>org.apache.maven.plugins</groupId>
288288
<artifactId>maven-war-plugin</artifactId>
289289
<version>${maven-war-plugin.version}</version>
290+
<configuration>
291+
<failOnMissingWebXml>false</failOnMissingWebXml>
292+
</configuration>
290293
</plugin>
291294

292295
<plugin>
293296
<groupId>org.apache.maven.plugins</groupId>
294297
<artifactId>maven-surefire-plugin</artifactId>
295298
<version>${maven-surefire-plugin.version}</version>
296299
<configuration>
300+
<testFailureIgnore>true</testFailureIgnore>
297301
<excludes>
298302
<exclude>**/*IntegrationTest.java</exclude>
299303
<exclude>**/*LiveTest.java</exclude>

spring-security-oauth/src/main/java/org/baeldung/config/PersistenceJPAConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@Configuration
2222
@EnableTransactionManagement
23-
@PropertySource({ "classpath:persistence.properties" })
23+
@PropertySource({ "classpath:persistence-${envTarget:prod}.properties" })
2424
@ComponentScan({ "org.baeldung.persistence" })
2525
@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao")
2626
public class PersistenceJPAConfig {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
################### DataSource Configuration ##########################
2+
jdbc.driverClassName=com.mysql.jdbc.Driver
3+
jdbc.url=jdbc:mysql://localhost:3306/oauth_reddit?createDatabaseIfNotExist=true
4+
jdbc.user=tutorialuser
5+
jdbc.pass=tutorialmy5ql
6+
7+
################### Hibernate Configuration ##########################
8+
hibernate.dialect=org.hibernate.dialect.MySQLDialect
9+
hibernate.show_sql=false
10+
hibernate.hbm2ddl.auto=update

spring-security-oauth/src/main/resources/persistence.properties.sample renamed to spring-security-oauth/src/main/resources/persistence-prod.properties.sample

File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
################### DataSource Configuration ##########################
2+
jdbc.driverClassName=com.mysql.jdbc.Driver
3+
jdbc.url=jdbc:mysql://localhost:3306/oauth_reddit?createDatabaseIfNotExist=true
4+
jdbc.user=tutorialuser
5+
jdbc.pass=tutorialmy5ql
6+
7+
################### Hibernate Configuration ##########################
8+
hibernate.dialect=org.hibernate.dialect.MySQLDialect
9+
hibernate.show_sql=false
10+
hibernate.hbm2ddl.auto=create-drop

0 commit comments

Comments
 (0)