Skip to content

Commit 9c76acb

Browse files
committed
refactor(uaa): Refactor UAA Architecture
1 parent 1a87378 commit 9c76acb

File tree

56 files changed

+64
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+64
-18
lines changed

uaa/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
<modules>
1818
<module>uaa-worker</module>
1919
<module>uaa-web</module>
20-
<module>uaa-user-manadgement-dev</module>
21-
<module>uaa-user-manadgement-prod</module>
20+
<module>uaa-commons</module>
21+
<module>uaa-user-manadgement-ldap</module>
22+
<module>uaa-user-manadgement-orm</module>
2223
</modules>
2324

2425
<dependencies>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package sanchez.sergio.config;
2+
3+
import java.io.Serializable;
4+
import javax.annotation.PostConstruct;
5+
import org.springframework.context.annotation.Bean;
6+
import org.springframework.context.annotation.Configuration;
7+
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
8+
import org.springframework.security.crypto.password.PasswordEncoder;
9+
import org.slf4j.Logger;
10+
import org.slf4j.LoggerFactory;
11+
12+
/**
13+
*
14+
* @author sergio
15+
*/
16+
@Configuration
17+
public class CommonSecurityConfig implements Serializable {
18+
19+
private Logger logger = LoggerFactory.getLogger(CommonSecurityConfig.class);
20+
21+
@Bean
22+
public PasswordEncoder passwordEncoder() {
23+
return new BCryptPasswordEncoder();
24+
}
25+
26+
@PostConstruct
27+
protected void init() {
28+
logger.info("init Common Security Config ...");
29+
}
30+
}

uaa/uaa-commons/src/main/java/sanchez/sergio/controller/ErrorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ public ResponseEntity usernameAlredyExists(final UsernameAlredyExistsException
2828
public ResponseEntity emailAlredyExists(final EmailAlredyExistsException exception){
2929
return createAndSendResponse(HttpStatus.BAD_REQUEST, UaaResponseCode.EMAIL_ALREDY_EXISTS, exception.getMessage());
3030
}
31-
31+
3232
}

uaa/uaa-user-manadgement-prod/pom.xml renamed to uaa/uaa-user-manadgement-odm/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.sanchez.sergio</groupId>
5-
<artifactId>uaa-user-manadgement-prod</artifactId>
5+
<artifactId>uaa-user-manadgement-odm</artifactId>
66
<version>0.0.1-SNAPSHOT</version>
77
<packaging>jar</packaging>
8-
<name>uaa/uaa-user-manadgement-prod</name>
9-
<description>User Manadgement for prod profile</description>
8+
<name>uaa/uaa-user-manadgement-odm</name>
9+
<description>User Manadgement ODM</description>
1010
<parent>
1111
<groupId>org.sanchez.sergio</groupId>
1212
<artifactId>uaa</artifactId>

0 commit comments

Comments
 (0)