The service side

Create a SpringBoot applet application on the platform

  • Create applets

    • Log in to ant Financial open platform, scan the code, log in and fill in the information, click alipay mini program, choose Immediate Access > Agree private Public test > start creation.
    • After filling in the basic information of the small program, click the create button to create a small program named XXX.
    • PS: A maximum of 10 small programs can be created under one account. Applets that have not been submitted for review can be deleted. The deleted applets are not counted.
  • Create a cloud application back-end service

    • Select the newly created small program on the small program page and click View to enter the developer page.
    • Choose Cloud Service (free) in the left navigation bar, click Create Cloud Service, select Create cloud Application, select SpringBoot for technology stack, fill in the application name and description to complete the cloud application creation.
  • Build environment

    • Return to the Cloud Services (Open Beta) page and click the Build Environment button in the cloud Service card you just created
    • On the Purchase environment resource page, select an appropriate environment configuration solution and click Agree Product Service Agreement to confirm the configuration.

    Note: Select Start small Program Cloud Application (Mysql version). The current test environment is provided for free, but if no code has been deployed for 7 consecutive days, the environment will be automatically recycled.

    • On the confirm order page, click Confirm to purchase. After the purchase is successful, the Build environment page is displayed. The building process takes several minutes. After the building is complete, you can view the application details or return to the application list.

Install alipay small program development tools in IDEA

  • Click here to download the latest plug-in version (com.Alipay. Devtools.idea-1.0.6.zip).
  • Install plugin => Plugins => Install plugin from disk… Click the downloaded Zip package to install. Restart the IDE as prompted to take effect.
  • Appearance & Behavior => Appearance => UI Options -> Name

Create a project

  • File > New > Project > Alipay DevTools, choose SpringBoot > Next > Finish;
  • After creation:
  • HelloController code:

Local projects connect with cloud applications of the platform

  • Click the login account in the applet cloud application view of IDEA and then log in as a user with developer permission by scanning code. PS: How to add a developer account: My applet => View => Member management => Add => Account to be added Find the corresponding prompt message on the client and click OK
  • Start docking
  • The code scanning box is displayed. Please log in by using alipay as a user with developer permission.
  • Click the Alipay DevTools in the bottom bar to associate it with its own mini program.
  • After you select your own applets, the following information indicates that the applets are successfully associated.
  • Select the associated cloud application
  • In the dialog box that is displayed, select the name of the cloud application created on the platform
  • Select cloud deployment in The following Alipay DevTools. If the following occurs, the association is successful
  • Start the deployment
  • After the deployment starts, the cloud Application Management window displays the deployment log. After the deployment, a message is displayed indicating that the deployment is complete.

The client

  • downloadApplets developer toolsAnd install
  • After creation, edit page/index/index.js
  • Start the simulator test as follows:
  • Open the console as follows:

So far, the Springboot project of ALIPAY small program construction has been completed. Later, there will be articles on Alipay authorization and payment, etc. Thank you for watching. If there is any error, please point it out in the comment section and I will correct it, crabs and crabs.