Farming Assistance System: A Project Report On
Farming Assistance System: A Project Report On
Team Members:
Shivam Singh
Abhinav Singh
Sahil Singhla
Himanshu Rai
Vinoothna
Devashish Singh
Back – End Documentation
When we click on the Generate button, it starts packing the project in a .zip file and
downloads the project.
File -> Import -> Existing Maven Project -> Next -> Browse -> Select the project -> Finish
It takes some time to import the project. When the project imports successfully, we can see
the project directory in the Package Explorer. The following image shows the project
directory:
Controller
bean
Repository
Model
security
exception
AdvertisementDAO.java
MspDAO.java
StockDAO.java
ComplainDAO.java
AdvertisementServiceImpl.java
MspServiceImpl.java
StockServiceImpl.java
ComplainServiceImpl.java
Controller-
This controller includes:
addAdvertisement()-To post the advertisement
viewStocks()- To view all the stocks
updateComplaint()- To update complain
deleteAdvertisement()- To delete stocks advertisement
deleteMsp()- To delete Msp
UserController
This controller includes:
userRegister()-To register[authority,farmer,supplier,retailer]
viewStock()- To view the product
addStock()- To add the stock
addAdvertisement()-To add advertisement
deleteAdvertisement()-To delete advertisement
viewComplaint()-To view the complain
updateComplain()-To update complain etc likewise many methods.
spring.datasource.url = jdbc:mysql://localhost:3306/medical_db?
allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.username = root
spring.datasource.password = root
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto = update
Step 10: Inside pom.xml file include all these following dependencies:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.25.0-GA</version>
</dependency>
</dependencies>
Step 2: Double click on the downloaded .msi file to start the installation. Click the Run
button on the first screen to begin the installation.
Step 3: In the next screen, click the "Next" button to continue with the installation
Step 4: In the next screen, Accept the license agreement and click on the Next button.
Step 5: In the next screen, choose the location where Node.js needs to be installed and then
click on the Next button.
1. First, enter the file location for the installation of Node.js. This is where the files for
Node.js will be stored after the installation.
Step 6: Accept the default components and click on the Next button.
Step 7: In the next screen, click the Install button to start the installation
The Angular CLI includes a server, so that you can build and serve your app locally.
1. Navigate to the workspace folder, such as my-app.
2. Run the following command:
-cd fas
Step 13: Now in routing.module.ts put this array for further navigation in the project :
const routes: Routes = [
{ path: '', redirectTo: '/login', pathMatch: 'full' },
{path : 'login', component : LoginComponent},
{path : 'home', component : HomeComponent},
{path : 'addAd', component : AddAdvertisementComponent},
{path : 'myAds', component : MyAdvertisementsComponent},
{path : 'viewAd', component : ViewAdvertisementComponent},
{path : 'register', component : RegisterComponent},
{path : 'selectRole', component : SelectRoleToRegisterComponent},
{path : 'addMsp', component : AddMspComponent},
{path : 'viewMsp', component : ViewMspComponent},
{path : 'updateDeleteMsp', component : UpdateDeleteMspComponent},
{ path: 'complaints', component:ViewComplaintComponent },
{ path: 'updateComplaint', component:UpdateComplaintComponent },
{ path: 'addStock', component: AddStockComponent },
{ path: 'stocks', component: ViewStockComponent },
{ path: 'stockDetail', component: StockDetailComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }