Skip to content

Commit 1b524c5

Browse files
author
eugenp
committed
maven cleanup, proxy fixes, mapping work
1 parent d571c7d commit 1b524c5

5 files changed

Lines changed: 20 additions & 16 deletions

File tree

‎eclipse/INTEGRATION-SINGLE.launch‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
33
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
4-
<listEntry value="/rest/src/test/java/org/rest/sec/web/privilege/PrivilegeSortRESTIntegrationTest.java"/>
4+
<listEntry value="/rest/src/test/java/org/rest/sec/web/role/RoleDiscoverabilityRESTIntegrationTest.java"/>
55
</listAttribute>
66
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
77
<listEntry value="1"/>
@@ -12,10 +12,10 @@
1212
</mapAttribute>
1313
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
1414
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
15-
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
15+
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value="whenResourceIsRetrieved_thenURIToGetAllResourcesIsDiscoverable"/>
1616
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
1717
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
18-
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.rest.sec.web.privilege.PrivilegeSortRESTIntegrationTest"/>
18+
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.rest.sec.web.role.RoleDiscoverabilityRESTIntegrationTest"/>
1919
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="rest"/>
2020
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
2121
</launchConfiguration>

‎pom.xml‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646
</dependency>
4747

4848
<!-- spring -->
49-
49+
<dependency>
50+
<groupId>org.springframework</groupId>
51+
<artifactId>spring-aspects</artifactId>
52+
<version>${spring.version}</version>
53+
</dependency>
5054
<dependency>
5155
<groupId>org.springframework</groupId>
5256
<artifactId>spring-webmvc</artifactId>
@@ -137,7 +141,7 @@
137141
<dependency>
138142
<groupId>org.springframework.data</groupId>
139143
<artifactId>spring-data-jpa</artifactId>
140-
<version>1.1.0.RELEASE</version>
144+
<version>1.1.1.RELEASE</version>
141145
</dependency>
142146
<dependency>
143147
<groupId>cglib</groupId>
@@ -571,28 +575,28 @@
571575

572576
<properties>
573577
<!-- VERSIONS -->
574-
<spring.version>3.1.2.RELEASE</spring.version> <!-- 3.1.0.BUILD-SNAPSHOT -->
578+
<spring.version>3.1.2.RELEASE</spring.version>
575579
<spring-security.version>3.1.1.RELEASE</spring-security.version>
576580
<javassist.version>3.16.1-GA</javassist.version>
577581
<cglib.version>2.2.2</cglib.version>
578582

579583
<commons-lang3.version>3.2-SNAPSHOT</commons-lang3.version>
580-
<guava.version>12.0</guava.version>
584+
<guava.version>12.0.1</guava.version>
581585

582586
<jackson-mapper-asl.version>1.9.7</jackson-mapper-asl.version>
583587
<jaxb-api.version>2.2.6</jaxb-api.version>
584588

585589
<!-- VERSIONS - persistence -->
586590
<mysql-connector-java.version>5.1.21</mysql-connector-java.version> <!-- latest version on: 05.10.2011 - http://dev.mysql.com/downloads/connector/j/ -->
587-
<hibernate.version>4.1.4.Final</hibernate.version>
591+
<hibernate.version>4.1.5.SP1</hibernate.version>
588592
<commons-dbcp.version>1.4</commons-dbcp.version>
589-
<querydsl.version>2.5.0</querydsl.version>
593+
<querydsl.version>2.7.1</querydsl.version>
590594

591595
<!-- VERSIONS - logging -->
592596
<org.slf4j.version>1.6.4</org.slf4j.version>
593597

594598
<!-- VERSIONS - testing -->
595-
<org.hamcrest.version>1.3.RC2</org.hamcrest.version>
599+
<org.hamcrest.version>1.3</org.hamcrest.version>
596600
<junit.version>4.10</junit.version>
597601
<mockito.version>1.9.0</mockito.version>
598602

‎src/main/java/org/rest/sec/web/controller/RoleController.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public Role findOneByName( @RequestParam( "name" ) final String name ){
104104

105105
@RequestMapping( method = RequestMethod.POST )
106106
@ResponseStatus( HttpStatus.CREATED )
107-
@Secured( SecurityConstants.CAN_ROLE_WRITE )
107+
// @Secured( SecurityConstants.CAN_ROLE_WRITE )
108108
public void create( @RequestBody final Role resource, final UriComponentsBuilder uriBuilder, final HttpServletResponse response ){
109109
createInternal( resource, uriBuilder, response );
110110
}
@@ -113,7 +113,7 @@ public void create( @RequestBody final Role resource, final UriComponentsBuilder
113113

114114
@RequestMapping( method = RequestMethod.PUT )
115115
@ResponseStatus( HttpStatus.OK )
116-
@Secured( SecurityConstants.CAN_ROLE_WRITE )
116+
// @Secured( SecurityConstants.CAN_ROLE_WRITE )
117117
public void update( @RequestBody final Role resource ){
118118
updateInternal( resource );
119119
}

‎src/main/java/org/rest/sec/web/controller/UserController.java‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
import org.rest.common.web.RestPreconditions;
1111
import org.rest.sec.model.dto.User;
1212
import org.rest.sec.persistence.service.dto.IUserService;
13-
import org.rest.sec.util.SecurityConstants;
1413
import org.rest.util.SearchCommonUtil;
1514
import org.rest.web.common.AbstractController;
1615
import org.rest.web.common.ISortingController;
1716
import org.springframework.beans.factory.annotation.Autowired;
1817
import org.springframework.dao.InvalidDataAccessApiUsageException;
1918
import org.springframework.http.HttpStatus;
20-
import org.springframework.security.access.annotation.Secured;
2119
import org.springframework.stereotype.Controller;
2220
import org.springframework.web.bind.annotation.PathVariable;
2321
import org.springframework.web.bind.annotation.RequestBody;
@@ -113,7 +111,7 @@ public void create( @RequestBody final User resource, final UriComponentsBuilder
113111

114112
@RequestMapping( method = RequestMethod.PUT )
115113
@ResponseStatus( HttpStatus.OK )
116-
@Secured( SecurityConstants.CAN_USER_WRITE )
114+
// @Secured( SecurityConstants.CAN_USER_WRITE )
117115
public void update( @RequestBody final User resource ){
118116
updateInternal( resource );
119117
}
@@ -122,7 +120,7 @@ public void update( @RequestBody final User resource ){
122120

123121
@RequestMapping( value = "/{id}",method = RequestMethod.DELETE )
124122
@ResponseStatus( HttpStatus.NO_CONTENT )
125-
@Secured( SecurityConstants.CAN_USER_WRITE )
123+
// @Secured( SecurityConstants.CAN_USER_WRITE )
126124
public void delete( @PathVariable( "id" ) final Long id ){
127125
deleteByIdInternal( id );
128126
}

‎src/main/java/org/rest/spring/context/ContextConfig.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package org.rest.spring.context;
22

33
import org.springframework.context.annotation.Configuration;
4+
import org.springframework.context.annotation.EnableAspectJAutoProxy;
45
import org.springframework.context.annotation.ImportResource;
56

67
@Configuration
78
@ImportResource( "classpath*:contextConfig.xml" )
9+
@EnableAspectJAutoProxy( proxyTargetClass = true )
810
public class ContextConfig{
911

1012
public ContextConfig(){

0 commit comments

Comments
 (0)