Okta Spring Boot 2 Angular 5 示例项目教程

Okta Spring Boot 2 Angular 5 示例项目教程

okta-spring-boot-2-angular-5-exampleA Cool Cars Example that showcases Spring Boot 2, Angular 5, and Okta's Support for both.项目地址:https://gitcode.com/gh_mirrors/ok/okta-spring-boot-2-angular-5-example

1. 项目目录结构及介绍

okta-spring-boot-2-angular-5-example/
├── client/
│   ├── src/
│   ├── angular.json
│   ├── package.json
│   ├── tsconfig.json
│   └── ...
├── server/
│   ├── src/
│   ├── pom.xml
│   ├── application.properties
│   └── ...
├── .gitignore
├── LICENSE
├── README.md
└── ...

目录结构说明

  • client/: 包含Angular前端项目的所有文件。

    • src/: Angular项目的源代码。
    • angular.json: Angular项目的配置文件。
    • package.json: 定义了前端项目的依赖和脚本。
    • tsconfig.json: TypeScript配置文件。
  • server/: 包含Spring Boot后端项目的所有文件。

    • src/: Spring Boot项目的源代码。
    • pom.xml: Maven项目的配置文件,定义了后端项目的依赖。
    • application.properties: Spring Boot项目的配置文件。
  • .gitignore: Git忽略文件列表。

  • LICENSE: 项目许可证。

  • README.md: 项目说明文档。

2. 项目启动文件介绍

前端启动文件

  • client/package.json
    • scripts部分定义了启动命令:
      "scripts": {
        "start": "ng serve",
        ...
      }
      
    • 启动前端项目:
      cd client
      npm install
      npm start
      

后端启动文件

  • server/pom.xml

    • 定义了Spring Boot项目的依赖和构建配置。
  • server/src/main/java/com/okta/developer/demo/DemoApplication.java

    • Spring Boot应用的主类,包含main方法:
      @SpringBootApplication
      public class DemoApplication {
          public static void main(String[] args) {
              SpringApplication.run(DemoApplication.class, args);
          }
      }
      
    • 启动后端项目:
      cd server
      ./mvnw spring-boot:run
      

3. 项目的配置文件介绍

前端配置文件

  • client/angular.json

    • Angular项目的配置文件,包含项目结构、构建选项等。
  • client/tsconfig.json

    • TypeScript配置文件,定义了编译选项。

后端配置文件

  • server/application.properties

    • Spring Boot项目的配置文件,包含数据库连接、服务器端口等配置:
      server.port=8080
      spring.datasource.url=jdbc:mysql://localhost:3306/demo
      spring.datasource.username=root
      spring.datasource.password=password
      
  • server/pom.xml

    • Maven配置文件,定义了项目的依赖和构建配置。

通过以上步骤,您可以成功启动并配置okta-spring-boot-2-angular-5-example项目。希望本教程对您有所帮助!

okta-spring-boot-2-angular-5-exampleA Cool Cars Example that showcases Spring Boot 2, Angular 5, and Okta's Support for both.项目地址:https://gitcode.com/gh_mirrors/ok/okta-spring-boot-2-angular-5-example

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

凤高崇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值