0

I've made a spring boot project called student-management using spring MVC, Thymeleaf, spring data JPA and MySql. When I run it locally on localhost:8081 it works perfectly. I made CRUD operations so I see all the changes in database when changed on the website and vice versa. Now, I need to get my website "out there" for others to see, specifically a company. I'm new to Spring boot and everything that goes with it but I don't understand how to deploy my rather simple website so the company can access it by not using localhost.

This is my project_hierarchy. As you can see it's quite simple.

This is my StudentController.java. I've used @Controller and maybe I should've used @RestController. If so, how do I change it to @RestController so that my website still works.

My thymeleaf html files students.html edit_students.html create_student.html

1 Answers1

0

Deploying remotely means choosing a host (e.g. AWS), setting up infrastructure, deploying your executable JAR with dependencies, and running it on a server.

You'll need to set up a separate MySQL instance and connect your app to it. That means you'll set up the database server, create the database and schema, and start it up before your app starts.

You should be thinking about security and who should be able to access your app and data. Most developers who have only deployed locally tend to put off those considerations. I'd urge you to think about them sooner.

If your purpose is to provide access inside your company, only to employees, perhaps you'd be better off making your local machine available to others on the network OR choose a server that's already on your company network. You'll have to work with others to make that happen.

duffymo
  • 305,152
  • 44
  • 369
  • 561