简体   繁体   English

如何在AWS Elastic Beanstalk上为Java Web应用程序创建用户身份验证系统?

[英]How to go about creating a user authentication system for a Java web app on AWS Elastic Beanstalk?

I am trying to build a user authentication system for my Java web application, a basic inventory management system. 我正在尝试为我的Java Web应用程序构建用户身份验证系统,这是一个基本的库存管理系统。 I want to use AWS Cognito to keep track of all user information, and I am planning to deploy this app to Elastic Beanstalk, where it will also use some AWS database storage (DynamoDB or RDS, to be determined) to store the inventory data. 我想使用AWS Cognito来跟踪所有用户信息,并且我打算将此应用程序部署到Elastic Beanstalk,该应用程序还将使用一些AWS数据库存储(要确定的是DynamoDB或RDS)来存储清单数据。 This is my first Java web application so I am having a bit of a hard time understanding how the different technologies can work together. 这是我的第一个Java Web应用程序,因此我很难理解不同的技术如何协同工作。

After doing some research on building a user authentication system for a Java web app, it seems that Spring MVC would be a great framework to use as it would eliminate a lot of the grunt work with building a login system. 在对为Java Web应用程序构建用户身份验证系统进行了一些研究之后,似乎Spring MVC将是一个很好的框架,因为它可以消除构建登录系统的繁琐工作。 However, pretty much every guide I have come across for a Spring MVC login system in Java requires Gradle or Maven. 但是,我在Java中遇到的有关Spring MVC登录系统的几乎所有指南都需要Gradle或Maven。 (I would be using Maven since I'm more familiar with it.) This is fine for when I'm running my project locally, but I'm concerned about how this will work when I want to upload my project to Elastic Beanstalk. (因为我对Maven更加熟悉,所以我会使用它。)这在我在本地运行项目时很好,但是当我要将项目上载到Elastic Beanstalk时,我担心它会如何工作。 It seems that the only way to deploy aa Java application from Maven to Elastic Beanstalk is with a open source project called Beanstalker , and I'm worried that if I develop my application using Spring MVC and Maven, when it comes time to put my project on Elastic Beanstalk I won't understand how to use this tool/it won't work properly. 似乎将Java应用程序从Maven部署到Elastic Beanstalk的唯一方法是使用一个名为Beanstalker的开源项目 ,并且我担心如果我使用Spring MVC和Maven开发应用程序,那么该放置项目了吗?在Elastic Beanstalk上,我不了解如何使用此工具/它将无法正常工作。

So here are my main questions: 所以这是我的主要问题:

  1. Would Spring MVC be a good tool to use in building my user authentication system? Spring MVC是用于构建用户身份验证系统的好工具吗? Is there a different framework I should look into? 我应该考虑其他框架吗?
  2. Does using Spring MVC absolutely require the use of Gradle or Maven, or is there a way to build a user auth system with Spring MVC without it? 使用Spring MVC是否绝对需要使用Gradle或Maven,或者有没有办法使用Spring MVC来构建用户身份验证系统?
  3. If I do use Spring MVC to build the auth system with Maven dependencies, will I have a hard time deploying it to Elastic Beanstalk, or am I overthinking it? 如果我确实使用Spring MVC构建具有Maven依赖项的auth系统,我是否会很难将其部署到Elastic Beanstalk,还是我考虑过度了?

Thanks for any information, I greatly appreciate it. 感谢您提供任何信息,非常感谢。

  1. Sure 当然
  2. Spring MVC does not require a specific dependency management tool Spring MVC不需要特定的依赖项管理工具
  3. No more difficult than deploying any other Java app to EB 与将其他任何Java应用程序部署到EB一样简单

Note, you dont have to deploy using Maven just because you use Maven for dependency management. 注意,您不必仅仅因为使用Maven进行依赖管理而使用Maven进行部署。 You would typically use the official Elastic Beanstalk command line tool to deploy your application. 通常,您将使用官方的Elastic Beanstalk 命令行工具来部署您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM