-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
191 changed files
with
4,811 additions
and
1,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/main/java/com/intelliarts/conflab/config/MethodSecurityConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
src/main/java/com/intelliarts/conflab/config/Security.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.