Skip to content

Commit

Permalink
ongoing work on #34 #39
Browse files Browse the repository at this point in the history
  • Loading branch information
phasenraum2010 committed Jul 15, 2018
1 parent 666baae commit 299dc11
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 18 deletions.
4 changes: 4 additions & 0 deletions defcon-local-neo4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
<artifactId>neo4j-ogm-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</dependency>

<!-- Spring Data Redis - Spring Session Redis-->
<!--
Expand Down
2 changes: 1 addition & 1 deletion defcon-local-neo4j/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ source ../defcon-parent/conf.sh
#mvn_build
#mvn_site
#mvn_travis
#mvn_run
mvn_run

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
)
@EnableTransactionManagement
@EnableConfigurationProperties({
JpaProperties.class,
//JpaProperties.class,
Neo4jProperties.class,
DataSourceProperties.class
})
Expand Down Expand Up @@ -72,15 +72,15 @@ public RedisOperationsSessionRepository sessionRepository(RedisTemplate redisTem
}


private final JpaProperties jpaProperties;
//private final JpaProperties jpaProperties;

private final Neo4jProperties neo4jProperties;

private final DataSourceProperties dataSourceProperties;

@Autowired
public StorageConfig(JpaProperties jpaProperties, Neo4jProperties neo4jProperties, DataSourceProperties dataSourceProperties) {
this.jpaProperties = jpaProperties;
public StorageConfig(Neo4jProperties neo4jProperties, DataSourceProperties dataSourceProperties) {
//this.jpaProperties = jpaProperties;
this.neo4jProperties = neo4jProperties;
this.dataSourceProperties = dataSourceProperties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"travis"
})
@EnableConfigurationProperties({
JpaProperties.class,
Neo4jProperties.class,
DataSourceProperties.class
//JpaProperties.class,
Neo4jProperties.class//,
//DataSourceProperties.class
})
public class StorageConfigurationDistributed {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import org.neo4j.ogm.session.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jProperties;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
//import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
//import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
Expand All @@ -36,7 +36,9 @@
})
public class StorageConfigurationEmbedded {

private final String packages[] = { "org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.domain" };
private final String packages[] = {
"org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.domain"
};

private final String graphDbFileName = "target/var/graphDb";

Expand Down Expand Up @@ -76,11 +78,11 @@ public SessionFactory sessionFactory(Driver neo4jDriver) {
@Autowired
private Neo4jConfigurationLogger neo4jConfigurationLogger;

@Autowired
private JpaProperties jpaProperties;
//@Autowired
//private JpaProperties jpaProperties;

@Autowired
private DataSourceProperties dataSourceProperties;
//@Autowired
//private DataSourceProperties dataSourceProperties;

@Autowired
private Neo4jProperties neo4jProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.security.web.authentication.RememberMeServices;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.session.data.redis.RedisOperationsSessionRepository;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.security.SpringSessionBackedSessionRegistry;
import org.springframework.session.security.web.authentication.SpringSessionRememberMeServices;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
Expand All @@ -31,7 +32,7 @@
@Configuration
@EnableWebMvc
@EnableWebSecurity
//@EnableRedisHttpSession
@EnableRedisHttpSession
//@EnableSpringDataWebSupport
@EnableConfigurationProperties({
//AllProperties.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,28 @@ public void actsIn(Movie movie) {
movies.add(movie);
movie.getActors().add(this);
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Set<Movie> getMovies() {
return movies;
}

public void setMovies(Set<Movie> movies) {
this.movies = movies;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ public class OneNode {
private Long id;
private String title;

public OneNode() {
}

public OneNode(String title) {
this.title = title;
}

public Long getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.repository;


import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.stereotype.Repository;
import org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.domain.Actor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
package org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.services.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.repository.ActorRepository;
import org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.services.ActorService;

/**
* Created by tw on 15.07.18.
*/
public class ActorServiceImpl {
@Service
public class ActorServiceImpl implements ActorService {

private final ActorRepository actorRepository;

@Autowired
public ActorServiceImpl(ActorRepository actorRepository) {
this.actorRepository = actorRepository;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
package org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.services.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.repository.MovieRepository;
import org.woehlke.humanrights.digital.defense.defcon1.storage.neo4j.services.MovieService;

/**
* Created by tw on 15.07.18.
*/
public class MovieServiceImpl {
@Service
public class MovieServiceImpl implements MovieService {

private final MovieRepository movieRepository;

@Autowired
public MovieServiceImpl(MovieRepository movieRepository) {
this.movieRepository = movieRepository;
}
}

0 comments on commit 299dc11

Please sign in to comment.