base_project

This commit is contained in:
2026-01-28 06:45:43 +00:00
commit 9860ff7374
1843 changed files with 119930 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
# File is used by sprigboot
server.contextPath=/*
server.port=9292
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/
spring.banner.location=classpath:banner_txt.txt
#Temporary disable security to enable it remove this
#security.ignored=/**
springfox.documentation.swagger.v2.path=/api-docs
spring.jackson.date-format=yyyy-MM-dd
chatgpt.api.url=https://api.openai.com/v1/completions
chatgpt.api.key=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
System.Net.ServicePointManager.Expect100Continue = false;
#spring.jpa.hibernate.ddl-auto=none
#spring.jpa.hibernate.ddl-auto=update
#spring.datasource.continue-on-error=false
# **** MY SQL DATABASE CONNECTION ****
spring.datasource.url=jdbc:mysql://realit-prod.cj462uqsa4mz.ap-south-1.rds.amazonaws.com:3306/realnet_CNSBENEW?createDatabaseIfNotExist=true
spring.datasource.username=cnsdev
spring.datasource.password=cnsdevprod1212
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
# Prefix Path
#spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.proc.param_null_passing=true
# **********paytm dependency ******
razorpay.api.key=rzp_test_xVnrBUjJWTEH0r
razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox
#***** MAIL SENDER
spring.mail.host=smtp.gmail.com
spring.mail.username=realitmailsender@gmail.com
spring.mail.password=epnmhzsccotnyozf
spring.mail.port=587
#spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
# JACKSON
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.socketFactory.port = 465
spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
spring.mail.properties.mail.smtp.socketFactory.fallback = false
#******* MULTIPART RESOLVER
spring.servlet.multipart.enabled=true
spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=100MB
#***************OAUTH2 SOCIAL LOGIN *********
# Social login provider props
spring.security.oauth2.client.registration.google.clientId=437023664181-0lm0ipgip3qbhga4nd7o4128jv4g2nv9.apps.googleusercontent.com
spring.security.oauth2.client.registration.google.clientSecret=I1HPyUqdJ9UONu45W1_wwfww
spring.security.oauth2.client.registration.google.scope=profile, email
spring.security.oauth2.client.registration.linkedin.clientId=<your-client-id>
spring.security.oauth2.client.registration.linkedin.clientSecret=<your-client-secret>
spring.security.oauth2.client.registration.linkedin.client-authentication-method=post
spring.security.oauth2.client.registration.linkedin.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.linkedin.scope=r_liteprofile, r_emailaddress
spring.security.oauth2.client.registration.linkedin.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
spring.security.oauth2.client.registration.linkedin.client-name=Linkedin
spring.security.oauth2.client.registration.linkedin.provider=linkedin
spring.security.oauth2.client.provider.linkedin.authorization-uri=https://www.linkedin.com/oauth/v2/authorization
spring.security.oauth2.client.provider.linkedin.token-uri=https://www.linkedin.com/oauth/v2/accessToken
spring.security.oauth2.client.provider.linkedin.user-info-uri=https://api.linkedin.com/v2/me
spring.security.oauth2.client.provider.linkedin.user-name-attribute=id
linkedin.email-address-uri=https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))
app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC
app.auth.tokenExpirationMsec=864000000
# After successfully authenticating with the OAuth2 Provider,
# we'll be generating an auth token for the user and sending the token to the
# redirectUri mentioned by the frontend client in the /oauth2/authorization request.
# We're not using cookies because they won't work well in mobile clients.
app.oauth2.authorizedRedirectUris=http://localhost:8081/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect
# projectPath=@project.basedir@
# angularProjectPath=@project.basedir@/webui
projectPath=/data
angularProjectPath=/data/webui
BACKEND_PORTAL_DOMAIN=http://157.66.191.31:30166

View File

@@ -0,0 +1,11 @@
*******************************************************************
*******************************************************************
__ _ ____ __ __ __
/ \ \ | |__****** / ___| **** ****_ \ \ \ \ \ \
/ / \ \ | '_ \ / _ \ \___ \| | | | '__|/ _ \ \ \ \ \ \ \
\ \ / / | |_) | __/ ___) | |_| | | | __/ / / / / / /
\ /_/ |_.__/ \___| |____/ \__,_|_| \___| /_/ /_/ /_/
*** *** *****
*******************************************************************
::SPRING BOOT:: CNS Version::v1.1.0 RELEASE
*******************************************************************

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} %p %m%n " />
<property name="APP_LOG_ROOT" value="logs"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<appender name="applicationLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${APP_LOG_ROOT}/ExceptionLogs/Error.log</file>
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${APP_LOG_ROOT}/ExceptionLogs/Error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
</appender>
<!-- <appender name="aopLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> -->
<!-- <file>${APP_LOG_ROOT}/application-aop.log</file> -->
<!-- <encoder> -->
<!-- <pattern>${LOG_PATTERN}</pattern> -->
<!-- </encoder> -->
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> -->
<!-- <fileNamePattern>${APP_LOG_ROOT}/application-aop-%i.log</fileNamePattern> -->
<!-- <minIndex>1</minIndex> -->
<!-- <maxIndex>10</maxIndex> -->
<!-- </rollingPolicy> -->
<!-- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> -->
<!-- <maxFileSize>10MB</maxFileSize> -->
<!-- </triggeringPolicy> -->
<!-- </appender> -->
<!-- <appender name="springLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> -->
<!-- <file>${APP_LOG_ROOT}/spring-framework.log</file> -->
<!-- <encoder> -->
<!-- <pattern>${LOG_PATTERN}</pattern> -->
<!-- </encoder> -->
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> -->
<!-- <fileNamePattern>${APP_LOG_ROOT}/spring-framework-%i.log</fileNamePattern> -->
<!-- <minIndex>1</minIndex> -->
<!-- <maxIndex>10</maxIndex> -->
<!-- </rollingPolicy> -->
<!-- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> -->
<!-- <maxFileSize>10MB</maxFileSize> -->
<!-- </triggeringPolicy> -->
<!-- </appender> -->
<!-- <appender name="hibernateLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> -->
<!-- <file>${APP_LOG_ROOT}/database.log</file> -->
<!-- <encoder> -->
<!-- <pattern>${LOG_PATTERN}</pattern> -->
<!-- </encoder> -->
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> -->
<!-- <fileNamePattern>${APP_LOG_ROOT}/database-%i.log</fileNamePattern> -->
<!-- <minIndex>1</minIndex> -->
<!-- <maxIndex>10</maxIndex> -->
<!-- </rollingPolicy> -->
<!-- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> -->
<!-- <maxFileSize>10MB</maxFileSize> -->
<!-- </triggeringPolicy> -->
<!-- </appender> -->
<!-- <appender name="console"
class="ch.qos.logback.core.ConsoleAppender">
<encoder name="enc"
class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout
class="com.realnet.logging1.PatternLayoutWithUserContext">
<param name="Pattern"
value="%d{HH:mm:ss.SSS} %-5level %logger{10} [%user %session] - %msg%n" />
</layout>
</encoder>
</appender> -->
<logger name="com.realnet" level="ERROR">
<appender-ref ref="applicationLog" />
</logger>
<!-- <logger name="com.realnet" level="INFO"> -->
<!-- <appender-ref ref="aopLog" /> -->
<!-- <appender-ref ref="console" /> -->
<!-- </logger> -->
<!-- <logger name="org.springframework" level="INFO"> -->
<!-- <appender-ref ref="springLog" /> -->
<!-- <appender-ref ref="console" /> -->
<!-- </logger> -->
<!-- <logger name="org.hibernate" level="ERROR"> -->
<!-- <appender-ref ref="hibernateLog" /> -->
<!-- <appender-ref ref="console" /> -->
<!-- </logger> -->
<root level="info">
<appender-ref ref="console" />
</root>
</configuration>

View File

@@ -0,0 +1,5 @@
email.notempty=Please provide valid email id.
email.valid=Email should be valid
email.regex=Enter a valid email
name.minsize=Name should have minimum 3 characters

View File

@@ -0,0 +1,57 @@
HEADER-LINE FORM :
GET: http://localhost:9119/api/teacher
GET: http://localhost:9119/api/teacher/{id}
PUT: http://localhost:9119/api/teacher/{id}
DELETE: http://localhost:9119/api/teacher/{id} : NEED TO MODIFY THE INCORRECT ID INPUT ERROR HANDLING
POST: http://localhost:9119/api/teacher
===EX1===
{
"name": "niladri",
"email": "sen.niladri6@gmail.com",
"phoneNumber": 6291,
"salary": 1000.0,
"students": [{
"name": "paku",
"depertment": "CSE",
"rollNumber": 108
}]
}
===EX2===:
{
"name": "sandipan",
"email": "sandy@gmail.com",
"phoneNumber": 9038,
"salary": 2000.0,
"students": [
{
"name": "sahil",
"depertment": "CSE",
"rollNumber": 111
},
{
"name": "tarun",
"depertment": "CSE",
"rollNumber": 121
}
]
}
===== 6.11.36
user.java class code changed
@Getter @Setter private List<Role> role;
TokenUtil class code change
===== 9.11.20
1.8
=== SWAGGER UI ====
http://localhost:9119/swagger-ui.html
=========
GIT HUB COMMAND
=========
$ git commit -m "your mesage"
$ git push origin main
$ git status
$ git push origin main

View File

@@ -0,0 +1,303 @@
/**
Model : NorthWind
**/
DROP SCHEMA IF EXISTS northwind;
CREATE SCHEMA northwind;
USE northwind;
/* Table: user (Application Users) */
CREATE TABLE user (
user_id NVARCHAR(20) NOT NULL,
password NVARCHAR(255) NOT NULL,
first_name NVARCHAR(50) ,
last_name NVARCHAR(50) ,
email NVARCHAR(70) ,
security_provider_id INT ,
default_customer_id INT ,
company NVARCHAR(50) ,
phone NVARCHAR(20) ,
address1 NVARCHAR(100),
address2 NVARCHAR(100),
country NVARCHAR(20) ,
postal NVARCHAR(20) ,
role NVARCHAR(20) ,
other_roles NVARCHAR(80) ,
is_active TINYINT ,
is_blocked TINYINT ,
secret_question NVARCHAR(100),
secret_answer NVARCHAR(100),
enable_beta_testing TINYINT,
enable_renewal TINYINT,
CONSTRAINT user_id PRIMARY KEY(user_id)
);
/* Table: customers */
CREATE TABLE customers (
id INT NOT NULL,
last_name VARCHAR(50) ,
first_name VARCHAR(50) ,
email VARCHAR(50) ,
company VARCHAR(50) ,
phone VARCHAR(25) ,
address1 VARCHAR(150),
address2 VARCHAR(150),
city VARCHAR(50) ,
state VARCHAR(50) ,
postal_code VARCHAR(15) ,
country VARCHAR(50) ,
PRIMARY KEY (id)
);
/* Table: employees */
CREATE TABLE employees (
id INT NOT NULL,
last_name VARCHAR(50) ,
first_name VARCHAR(50) ,
email VARCHAR(50) ,
avatar VARCHAR(250) ,
job_title VARCHAR(50) ,
department VARCHAR(50) ,
manager_id INT ,
phone VARCHAR(25) ,
address1 VARCHAR(150),
address2 VARCHAR(150),
city VARCHAR(50) ,
state VARCHAR(50) ,
postal_code VARCHAR(15) ,
country VARCHAR(50) ,
PRIMARY KEY (id)
);
/* Table: orders */
CREATE TABLE orders (
id INT NOT NULL,
employee_id INT ,
customer_id INT ,
order_date DATETIME ,
shipped_date DATETIME ,
ship_name VARCHAR(50) ,
ship_address1 VARCHAR(150) ,
ship_address2 VARCHAR(150) ,
ship_city VARCHAR(50) ,
ship_state VARCHAR(50) ,
ship_postal_code VARCHAR(50) ,
ship_country VARCHAR(50) ,
shipping_fee DECIMAL(19,4) NULL DEFAULT '0.0000',
payment_type VARCHAR(50) ,
paid_date DATETIME ,
order_status VARCHAR(25),
PRIMARY KEY (id)
);
/* Table: order_details */
CREATE TABLE order_items (
order_id INT NOT NULL,
product_id INT ,
quantity DECIMAL(18,4) NOT NULL DEFAULT '0.0000',
unit_price DECIMAL(19,4) NULL DEFAULT '0.0000',
discount DECIMAL(19,4) NULL DEFAULT '0.0000',
order_item_status VARCHAR(25),
date_allocated DATETIME ,
PRIMARY KEY (order_id, product_id)
);
/* Table: products */
CREATE TABLE products (
id INT NOT NULL,
product_code VARCHAR(25) ,
product_name VARCHAR(50) ,
description VARCHAR(250),
standard_cost DECIMAL(19,4) NULL DEFAULT '0.0000',
list_price DECIMAL(19,4) NOT NULL DEFAULT '0.0000',
target_level INT ,
reorder_level INT ,
minimum_reorder_quantity INT ,
quantity_per_unit VARCHAR(50) ,
discontinued TINYINT NOT NULL DEFAULT '0',
category VARCHAR(50),
PRIMARY KEY (id)
);
/* Foreign Key: orders */
ALTER TABLE orders ADD CONSTRAINT fk_orders__customers FOREIGN KEY (customer_id) REFERENCES customers(id);
ALTER TABLE orders ADD CONSTRAINT fk_orders__employees FOREIGN KEY (employee_id) REFERENCES employees(id);
/* Foreign Key: order_items */
ALTER TABLE order_items ADD CONSTRAINT fk_order_items__orders FOREIGN KEY (order_id) REFERENCES orders(id);
ALTER TABLE order_items ADD CONSTRAINT fk_order_items__products FOREIGN KEY (product_id) REFERENCES products(id);
/* Views */
CREATE OR REPLACE VIEW order_info AS
select o.id as order_id
, o.order_date
, o.order_status
, o.paid_date
, o.payment_type
, o.shipped_date
, o.shipping_fee
, o.ship_name
, o.ship_address1
, o.ship_address2
, o.ship_city
, o.ship_state
, o.ship_postal_code
, o.ship_country
, o.customer_id
, o.employee_id
, concat(c.first_name, ' ', c.last_name) as customer_name
, c.phone customer_phone
, c.email customer_email
, c.company as customer_company
, concat(e.first_name, ' ', e.last_name) as employee_name
, e.department employee_department
, e.job_title employee_job_title
From orders o
, employees e
, customers c
where o.employee_id = e.id
and o.customer_id = c.id;
CREATE OR REPLACE VIEW order_details AS
select oi.order_id
, oi.product_id
, oi.quantity
, oi.unit_price
, oi.discount
, oi.date_allocated
, oi.order_item_status
, o.order_date
, o.order_status
, o.paid_date
, o.payment_type
, o.shipped_date
, o.shipping_fee
, o.ship_name
, o.ship_address1
, o.ship_address2
, o.ship_city
, o.ship_state
, o.ship_postal_code
, o.ship_country
, p.product_code
, p.product_name
, p.category
, p.description
, p.list_price
, o.customer_id
, concat(c.first_name, ' ', c.last_name) as customer_name
, c.phone as customer_phone
, c.email as customer_email
, c.company as customer_company
, o.employee_id
, concat(e.first_name, ' ', e.last_name) as employee_name
, e.department as employee_department
, e.job_title as employee_job_title
From orders o
, products p
, order_items oi
, employees e
, customers c
where oi.order_id = o.id
and oi.product_id = p.id
and o.employee_id = e.id
and o.customer_id = c.id;
CREATE OR REPLACE VIEW customer_orders AS
select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.customer_id
, c.first_name customer_first_name, c.last_name customer_last_name, c.phone customer_phone, c.email customer_email, c.company
from orders o,customers c
where o.customer_id = c.id;
CREATE OR REPLACE VIEW employee_orders AS
select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.employee_id
, e.first_name employee_first_name, e.last_name employee_last_name, e.email employee_email, e.department
from orders o,employees e
where o.customer_id = e.id;
/* REAL_NET */
CREATE TABLE RN_INSTRUCTOR (
ID VARCHAR(20) NOT NULL AUTO_INCREMENT,
FIRST_NAME VARCHAR(20) NOT NULL,
LAST_NAME VARCHAR(20) NOT NULL,
EMAIL VARCHAR(20) NOT NULL,
CREATED_AT DATETIME,
UPDATED_AT DATETIME,
PRIMARY KEY (id)
);
/*==== EXTENSION FIELD ===*/
CREATE TABLE RN_EXT_FIELD_T (
ID int(11) NOT NULL AUTO_INCREMENT,
TYPE VARCHAR(20),
DATA_TYPE VARCHAR(20),
FIELD_NAME VARCHAR(20),
MAPPING VARCHAR(20),
FORM_CODE VARCHAR(20),
IS_ACTIVE BOOLEAN,
ACCOUNT_ID VARCHAR(20),
CREATED_AT DATETIME,
UPDATED_AT DATETIME,
CREATED_BY VARCHAR(20),
UPDATED_BY VARCHAR(20),
PRIMARY KEY (ID)
);
/*========= lookup ========
CREATE TABLE `rn_lookup_values_t` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`LOOKUP_CODE` longtext,
`MEANING` longtext,
`DESCRIPTION` longtext,
`LOOKUP_TYPE` longtext,
`ACTIVE_START_DATE` datetime DEFAULT NULL,
`ACTIVE_END_DATE` datetime DEFAULT NULL,
`ENABLED_FLAG` longtext,
`CREATED_BY` int(11) DEFAULT NULL,
`CREATION_DATE` datetime DEFAULT NULL,
`LAST_UPDATED_BY` int(11) DEFAULT NULL,
`LAST_UPDATE_DATE` datetime DEFAULT NULL
PRIMARY KEY (`ID`)
); */
/*========= LOGGING ========
DROP TABLE logging_event_exception IF EXISTS;
DROP TABLE logging_event_property IF EXISTS;
DROP TABLE logging_event IF EXISTS;
CREATE TABLE logging_event (
timestmp BIGINT NOT NULL,
formatted_message LONGVARCHAR NOT NULL,
logger_name VARCHAR(256) NOT NULL,
level_string VARCHAR(256) NOT NULL,
thread_name VARCHAR(256),
reference_flag SMALLINT,
arg0 VARCHAR(256),
arg1 VARCHAR(256),
arg2 VARCHAR(256),
arg3 VARCHAR(256),
caller_filename VARCHAR(256),
caller_class VARCHAR(256),
caller_method VARCHAR(256),
caller_line CHAR(4),
event_id IDENTITY NOT NULL);
CREATE TABLE logging_event_property (
event_id BIGINT NOT NULL,
mapped_key VARCHAR(254) NOT NULL,
mapped_value LONGVARCHAR,
PRIMARY KEY(event_id, mapped_key),
FOREIGN KEY (event_id) REFERENCES logging_event(event_id));
CREATE TABLE logging_event_exception (
event_id BIGINT NOT NULL,
i SMALLINT NOT NULL,
trace_line VARCHAR(256) NOT NULL,
PRIMARY KEY(event_id, i),
FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); */