This commit is contained in:
parent
48ed8ac469
commit
e981d9c92e
|
@ -263,19 +263,19 @@ public class Projects {
|
|||
|
||||
Project newproj = projectDao.create(project);
|
||||
|
||||
DMP newdmp = new DMP();
|
||||
newdmp.setId(null);
|
||||
newdmp.setLabel("Auto-Generated");
|
||||
newdmp.setCreated(new Date());
|
||||
newdmp.setVersion(1);
|
||||
newdmp.setStatus(new Short("0"));
|
||||
newdmp.setProject(newproj);
|
||||
|
||||
Set<UserInfo> users = new HashSet<UserInfo>();
|
||||
users.add(userInfo);
|
||||
newdmp.setUsers(users);
|
||||
|
||||
newdmp = dMPDao.create(newdmp);
|
||||
// DMP newdmp = new DMP();
|
||||
// newdmp.setId(null);
|
||||
// newdmp.setLabel("Auto-Generated");
|
||||
// newdmp.setCreated(new Date());
|
||||
// newdmp.setVersion(1);
|
||||
// newdmp.setStatus(new Short("0"));
|
||||
// newdmp.setProject(newproj);
|
||||
//
|
||||
// Set<UserInfo> users = new HashSet<UserInfo>();
|
||||
// users.add(userInfo);
|
||||
// newdmp.setUsers(users);
|
||||
//
|
||||
// newdmp = dMPDao.create(newdmp);
|
||||
|
||||
return ResponseEntity.status(HttpStatus.OK).body(SerializerProvider.toJson(newproj));
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class Users {
|
|||
|
||||
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = { "/user/whoami" }, produces="application/json")
|
||||
@RequestMapping(method = RequestMethod.GET, value = { "/user/whoami" }, produces="application/json;charset=UTF-8")
|
||||
public @ResponseBody ResponseEntity<Object> whoami(){
|
||||
|
||||
|
||||
|
@ -88,6 +88,7 @@ public class Users {
|
|||
|
||||
UserInfo userInfo = userInfoDao.getUserInfo(userID);
|
||||
|
||||
System.out.println(userInfo.getName());
|
||||
|
||||
if(userInfo==null) //this should normally never happer
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("There's no such a user on the system. You shouldn't be here");
|
||||
|
|
|
@ -65,16 +65,16 @@
|
|||
</listener>
|
||||
|
||||
|
||||
<!-- THIS FILTER IS FOR SPRING SECURITY -->
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/applicationContext.xml,/WEB-INF/spring-security.xml</param-value>
|
||||
<!-- <param-value>/WEB-INF/applicationContext.xml</param-value> -->
|
||||
<!-- <param-value>/WEB-INF/applicationContext.xml</param-value> -->
|
||||
</context-param>
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout>
|
||||
</session-config>
|
||||
|
||||
<!-- THIS FILTER IS FOR SPRING SECURITY -->
|
||||
<filter>
|
||||
<filter-name>springSecurityFilterChain</filter-name>
|
||||
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
||||
|
@ -85,6 +85,23 @@
|
|||
</filter-mapping>
|
||||
|
||||
|
||||
<!-- THIS FILTER IS FOR SUPPORTING UNICODE CHARACTERS -->
|
||||
<filter>
|
||||
<filter-name>encodingFilter</filter-name>
|
||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>encoding</param-name>
|
||||
<param-value>UTF-8</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>forceEncoding</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>encodingFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
|
||||
</web-app>
|
Loading…
Reference in New Issue