Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
product-management-svc
Overview
Overview
Details
Activity
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
mbdk-tot
product-management-svc
Commits
4ec171d2
Commit
4ec171d2
authored
May 23, 2025
by
Thaswin Muralikaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated readme file
parent
69a8d8aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
README.md
README.md
+11
-8
No files found.
README.md
View file @
4ec171d2
...
...
@@ -107,7 +107,7 @@ my-product-management-svc
-
In the application.properties file under the resources folder add the database configuration.
```
```
java properties
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/productmngm?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=01234
...
...
@@ -131,7 +131,7 @@ spring.jpa.hibernate.ddl-auto=update
##### i. Importing packages and classes
```
```
java
package
com
.
ctsb
.
my_product_management_svc
.
category
;
import
com.ctsb.my_product_management_svc.product.Product
;
...
...
@@ -148,7 +148,7 @@ import java.util.List;
##### ii. Adding annotations
```
```
java
@Getter
@Setter
@Entity
...
...
@@ -157,7 +157,7 @@ import java.util.List;
##### iii. Defining class and fields
```
```
java
public
class
Category
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
...
@@ -183,7 +183,7 @@ public class Category {
##### i. Importing packages and classes
```
```
java
package
com
.
ctsb
.
my_product_management_svc
.
product
;
import
com.ctsb.my_product_management_svc.category.Category
;
...
...
@@ -197,7 +197,7 @@ import java.time.LocalDateTime;
##### ii. Adding annotations
```
```
java
@Getter
@Setter
@Entity
...
...
@@ -206,7 +206,7 @@ import java.time.LocalDateTime;
##### iii. Defining class and fields
```
```
java
public
class
Product
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
...
@@ -243,7 +243,7 @@ public enum Status {
##### v. Declaring relationship between category and product
```
```
java
//Declare one-to-many relationship to product in category
@OneToMany
(
mappedBy
=
"category"
,
orphanRemoval
=
true
)
@JsonIgnore
...
...
@@ -259,6 +259,7 @@ public enum Status {
<summary>
Full code of category entity
</summary>
```
java
package
com
.
ctsb
.
my_product_management_svc
.
category
;
import
com.ctsb.my_product_management_svc.product.Product
;
...
...
@@ -307,6 +308,7 @@ private Long id;
<summary>
Full code of product entity
</summary>
```
java
package
com
.
ctsb
.
my_product_management_svc
.
product
;
import
com.ctsb.my_product_management_svc.category.Category
;
...
...
@@ -345,6 +347,7 @@ public class Product {
@JoinColumn
(
name
=
"category_id"
,
nullable
=
false
)
private
Category
category
;
}
```
</details>
...
...
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