前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Demo佛萨奇2.0魔豹联盟系统开发技术源码解析

Demo佛萨奇2.0魔豹联盟系统开发技术源码解析

原创
作者头像
开发v_StPv888
发布2022-10-27 09:34:37
3100
发布2022-10-27 09:34:37
举报
文章被收录于专栏:making

In the future,based on the Internet platform,blockchain technology will be used to make a new change.Now is the key turning point.If there are any tie points in the blockchain that try to tamper with data privately,and most nodes do not change,this tampering behavior will then be rejected by the whole blockchain to ensure the consensus and security of the whole network.

  但是如果我们把约定通过代码的形式,录入区块链中,一旦触发约定时的条件,就会有程序来自动执行,这就是智能合约。

  The contract runs on blockchain technology,which is the basic technology of bitcoin and most cryptocurrencies.The input information represents the values assigned by the developer.When these values are met,the contract executes itself according to the rules it is programmed to execute.

添加代码

  • 添加类MyController:
代码语言:javascript
复制
package com.kb.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyController
{
	@RequestMapping("/controller1")
	public String controllerFunc1(Model m)
	{
		m.addAttribute("msg","hello controller 1");
		return "test";
	}
	@RequestMapping("/controller2")
	public String controllerFunc2(Model m)
	{
		m.addAttribute("msg","hello controller 2");
		return "test";
	}
	@RequestMapping("/controller3")
	public String controllerFunc3(Model m)
	{
		m.addAttribute("msg","hello controller 3");
		return "test";
	}
}

这里使用注解的方式,有三个方法可以被前端调用,分别为controllerFunc1controllerFunc2controllerFunc3;URL分别为http://localhost:8080/controller1http://localhost:8080/controller2http://localhost:8080/controller3。由于springmvc-servlet.xml里配置了web访问的路径前缀包括jsp,因此在WEB-INFO路径下添加jsp文件夹,并创建test.jsp文件。

代码语言:javascript
复制
<%--
  Created by IntelliJ IDEA.
  User: KingBoy
  Date: 2021/11/14
  Time: 19:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
${msg}
</body>
</html>

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 添加代码
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档