Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kafka-mongo-poc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pavitra Mallemdoddi Papili
kafka-mongo-poc
Commits
2394afc8
Commit
2394afc8
authored
Mar 24, 2021
by
ppapili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Unique Key for employee
parent
952a69e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
Employee.java
src/main/java/com/poc/kafka/mongo/entity/Employee.java
+2
-0
application.properties
src/main/resources/application.properties
+1
-0
No files found.
src/main/java/com/poc/kafka/mongo/entity/Employee.java
View file @
2394afc8
package
com
.
poc
.
kafka
.
mongo
.
entity
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.index.Indexed
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Field
;
...
...
@@ -9,6 +10,7 @@ public class Employee {
@Id
private
String
_id
;
@Field
(
name
=
"emp_id"
)
@Indexed
(
unique
=
true
)
private
Long
empId
;
@Field
(
name
=
"emp_name"
)
private
String
empName
;
...
...
src/main/resources/application.properties
View file @
2394afc8
...
...
@@ -22,5 +22,6 @@ spring.data.mongodb.database=ownDatabase
server.servlet.context-path
=
/kafka-mongo-poc
logging.level.org.springframework.data.mongodb.core.MongoTemplate
=
DEBUG
spring.data.mongodb.auto-index-creation
=
true
logging.level.org.springframework
=
INFO
logging.level.root
=
INFO
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment