Skip to content

Commit

Permalink
CL-50 merge version 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalii-dmytruk committed Jan 18, 2016
2 parents f75201a + de0d377 commit 44cccde
Show file tree
Hide file tree
Showing 191 changed files with 4,811 additions and 1,642 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
* text=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.

# Declare files that will always have LF line endings on checkout.
*.csv text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.jar
*.war
*.ear
!CodeStyleIdeaSettings.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
Expand Down
Binary file added CodeStyleIdeaSettings.jar
Binary file not shown.
54 changes: 45 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
buildscript {
ext {
springBootVersion = '1.2.7.RELEASE'
springBootVersion = '1.3.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE")
classpath("io.spring.gradle:dependency-management-plugin:0.5.4.RELEASE")
classpath("org.flywaydb:flyway-gradle-plugin:3.2.1")

}
}

plugins {
id 'com.craigburke.bower-installer' version '2.1.4'
id 'com.craigburke.bower-installer' version '2.5.1'
}

apply plugin: 'java'
Expand All @@ -27,23 +26,33 @@ apply plugin: 'org.flywaydb.flyway'
sourceCompatibility = 1.8
//noinspection GroovyUnusedAssignment
targetCompatibility = 1.8
//noinspection GroovyUnusedAssignment
mainClassName = 'com.intelliarts.conflab.ConfLabApp'

repositories {
mavenCentral()
}

idea {
module {
sourceDirs += file('src/main')
testSourceDirs += file('src/test')
}
}

dependencies {
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-security")
compile("org.springframework.security:spring-security-core:4.0.3.RELEASE")
compile("org.flywaydb:flyway-core:3.2.1")
compile("org.modelmapper:modelmapper:0.7.5")
runtime("org.postgresql:postgresql:9.4-1205-jdbc42")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.4")
runtime("org.postgresql:postgresql:9.4-1206-jdbc42")

testCompile('junit:junit:4.12')
testCompile('org.hamcrest:hamcrest-all:1.3')
}

jar.archiveName = "ConfLab.jar"

bower {
installBase = 'src/main/resources/static/lib'

Expand All @@ -66,6 +75,11 @@ bower {

'basscss'('7.0.x')

'toastr'('2.x.x') {
source 'toastr*'
}


'html.sortable'('0.3.x')

'backbone'('1.2.x') {
Expand All @@ -76,19 +90,41 @@ bower {
source 'lib/backbone.marionette*'
}

'backbone.radio'('1.0.1') {
'backbone.radio'('1.0.2') {
source 'build/*'
}

'backbone.stickit'('0.9.2') {
source 'backbone.stickit.js'
}

'backbone-nested-models'('blittle/backbone-nested-models#v2.0.2') {
source 'backbone-nested-models*'
}

'backbone-validation'('0.11.5'){
source 'dist/*'
}

'requirejs'() {
source 'require.js'
}

'requirejs-text'()

'select2'('4.0.1') {
source 'dist/js/*' >> 'js/'
source 'dist/css/*' >> 'css/'
}

'select2-bootstrap-theme'('0.1.0-beta.4'){
source 'dist/*'
}
'bootstrap-datepicker'('1.5.x'){
source 'dist/js/*' >> 'js/'
source 'dist/css/*' >> 'css/'
source 'dist/locales/*' >> 'locales/'
}
}

additional = [
Expand Down
27 changes: 24 additions & 3 deletions src/main/java/com/intelliarts/conflab/ConfLabApp.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
package com.intelliarts.conflab;

import org.modelmapper.ModelMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.ErrorPage;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpStatus;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;

@SpringBootApplication
public class ConfLabApp {

public static void main(String[] args) {
SpringApplication.run(ConfLabApp.class, args);
}

@Bean
public ModelMapper getModelMapper() {
return new ModelMapper();
public ServerProperties serverProperties() {
return new ServerProperties() {
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
super.customize(container);
container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"));
}
};
}

@Bean
public Jackson2ObjectMapperBuilder jacksonBuilder() {
Jackson2ObjectMapperBuilder b = new Jackson2ObjectMapperBuilder();
b.findModulesViaServiceLoader(true);
b.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
return b;
}

}
52 changes: 0 additions & 52 deletions src/main/java/com/intelliarts/conflab/api/Speaker.java

This file was deleted.

31 changes: 0 additions & 31 deletions src/main/java/com/intelliarts/conflab/api/Stage.java

This file was deleted.

55 changes: 0 additions & 55 deletions src/main/java/com/intelliarts/conflab/api/User.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.intelliarts.conflab.config;

import com.intelliarts.conflab.security.HasAuthorityAnnotationSecurityMetadataSource;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.access.expression.method.ExpressionBasedAnnotationAttributeFactory;
import org.springframework.security.access.method.MethodSecurityMetadataSource;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration;

@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class MethodSecurityConfig extends GlobalMethodSecurityConfiguration {

@Override
protected MethodSecurityMetadataSource customMethodSecurityMetadataSource() {
ExpressionBasedAnnotationAttributeFactory attributeFactory =
new ExpressionBasedAnnotationAttributeFactory(getExpressionHandler());
return new HasAuthorityAnnotationSecurityMetadataSource(attributeFactory);
}
}
34 changes: 0 additions & 34 deletions src/main/java/com/intelliarts/conflab/config/Security.java

This file was deleted.

Loading

0 comments on commit 44cccde

Please sign in to comment.