Spring Boot可以实现Spring MVC框架的所有功能吗?(Can Spring Boot achieve everything what a Spring MVC framework can?)
我的情况是我向团队推荐是否应该使用Spring MVC Framework或Spring Boot框架(因为这个框架在很大程度上缩短了实现时间)。 我已经参与了几个Spring MVC项目,所以我知道使用Spring MVC可以实现什么,但我一直在研究Spring Boot。
因此,我知道这两个伟大框架之间的区别。 但问题是,Spring Boot是否允许我们实现类似Spring MVC提供的功能来实现几乎任何东西?
我不知道我们将从客户端获得什么要求以及我是Spring Boot框架的新手,所以这就是我怀疑这个框架的原因。 一般来说,您会推荐哪种框架?
I'm in a situation where I got to recommend to my team whether we should go with Spring MVC Framework or with Spring Boot framework (as this framework has reduced the implementation time to great extent). I have worked on several Spring MVC projects so I am aware what can be accomplished using Spring MVC, but I have also been working on Spring Boot since a while.
Hence I know the difference between these two great frameworks. But here the question is, does Spring Boot let us implement anything like Spring MVC provides features to implement almost anything?
I don't know what requirements we will be getting from client as well as I'm newbie to Spring Boot framework so that's the reason I doubt on this framework. In general which framework you would recommend?
原文:https://stackoverflow.com/questions/46082827
最满意答案
这是一个工作(和相对较小的例子):
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> /* * To compile: * cc thread.c -o thread-test -lpthread */ struct info { char first_name[64]; char last_name[64]; }; void *thread_worker(void *data) { int i; struct info *info = data; for (i = 0; i < 100; i++) { printf("Hello, %s %s!\n", info->first_name, info->last_name); } } int main(int argc, char **argv) { pthread_t thread_id; struct info *info = malloc(sizeof(struct info)); strcpy(info->first_name, "Sean"); strcpy(info->last_name, "Bright"); if (pthread_create(&thread_id, NULL, thread_worker, info)) { fprintf(stderr, "No threads for you.\n"); return 1; } pthread_join(thread_id, NULL); return 0; }
Here is a working (and relatively small example):
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> /* * To compile: * cc thread.c -o thread-test -lpthread */ struct info { char first_name[64]; char last_name[64]; }; void *thread_worker(void *data) { int i; struct info *info = data; for (i = 0; i < 100; i++) { printf("Hello, %s %s!\n", info->first_name, info->last_name); } } int main(int argc, char **argv) { pthread_t thread_id; struct info *info = malloc(sizeof(struct info)); strcpy(info->first_name, "Sean"); strcpy(info->last_name, "Bright"); if (pthread_create(&thread_id, NULL, thread_worker, info)) { fprintf(stderr, "No threads for you.\n"); return 1; } pthread_join(thread_id, NULL); return 0; }
相关问答
更多-
改变你的方法看起来像这样: String curloc = current.toString(); String itemdesc = item.mDescription; ArrayList
passing = new ArrayList (); passing.add(itemdesc); passing.add(curloc); new calc_stanica().execute(passing); //no need to pass in result list 并 ... -
这是一个工作(和相对较小的例子): #include
#include #include #include /* * To compile: ... -
head main()中的head是指向struct node的指针。 它被初始化为NULL并传递给线程函数。 它们都接收NULL指针。 然后addThread()可能能够使用insert()增长自己的节点列表,但是wakeThread()肯定不会用deleteNode()删除任何节点列表,因为它只是没有正确的指针,它只有是一个NULL指针,它尝试取消引用和崩溃。 head in main() is a pointer to struct node. It's initialized to NULL and ...
-
传递-std=c++11它会起作用; 看下面的成绩单。 (在OS X上运行。) nathanst% g++ t.cpp t.cpp:13:12: error: no matching constructor for initialization of 'std::__1::thread' thread t1(func,4); ^ ~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault ...
-
传递参数(Passing down arguments)[2022-07-24]
我知道你说你试过splitArgs.apply(this, arguments) ......但它似乎对我splitArgs.apply(this, arguments) : function splitArgs() { return { text: arguments[0], class: arguments[1] || "" }; } function doSomething() { var args = splitArgs.appl ... -
将参数传递给线程(Passing arguments to a thread)[2023-12-22]
这是因为对于pthread_create的NUM_T调用, &structure始终相同。 你可以试试 estrutura_main structure[NUM_T]; for(i=0;i为每个任务类型都有一个单独的队列 - 您可能没有成千上万的任务类型 。 这些中的每一个都可以是例如任务的静态成员。 然后addJob()实际上是Task的ctor,它是完全类型安全的。 然后定义任务类型的编译时列表,并通过模板元编程(for_each)访问它。 它会更快,因为你不需要任何虚拟调用fnptr / std::function<>来实现这一点。 这只有在您的元组代码看到所有Task类时才会起作用(因此您不能通过从光盘加载图像来向已经运行的可执行文件添加Task的新后代 - 希望这不是问题)。 te ...指针未初始化时未定义行为的经典问题。 struct client_struct * client; client = malloc(sizeof(*client)); //Allocate memory for client client->... = ...; //DO you job 通过struct client_struct * client; 你只是声明变量(可能在某一点上)指向struct client_struct类型的数据。 由于您还没有数据,因此取消引用非初始化指针会导致未定义的行为。 ...创建一个堆变量来保存数据并将其传递给线程。 Secure * m_Secure = new Secure(); m_Secure->UID = g_User[PlayerNumber].UID; m_Secure->MainClass = this; CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)SecureThread,m_Secure,NULL,NULL); 获取线程中的数据,并在完成后删除 RESULT WINAPI SecureThread(LPVO ...问题是你在CallThreads的构造函数上调用target(args) 。 因此,以下调用将阻塞,直到CallThreads.__init__()完成: thread_handler = CallThreads(someFunction, phrase, num) 更新:一种可能性如下: class CallThreads(threading.Thread): def __init__(self, *args): self._args = args thre ...相关文章
更多- 什么是Spring boot
- Spring MVC 3 深入总结
- Spring Boot上传文件示例
- 快速了解Spring Boot
- Spring boot入门实例
- Spring Boot CLI快速入门程序
- Spring Boot CL简介
- Spring boot整合mybatis plus
- Spring Boot CLI 基于Thymeleaf的示例
- Spring MVC文件上传
最新问答
更多- 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
- 如何通过引用返回对象?(How is returning an object by reference possible?)
- 矩阵如何存储在内存中?(How are matrices stored in memory?)
- 每个请求的Java新会话?(Java New Session For Each Request?)
- css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
- 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
- xcode语法颜色编码解释?(xcode syntax color coding explained?)
- 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
- 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
- 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
- 西安哪有PLC可控制编程的培训
- 在Entity Framework中选择基类(Select base class in Entity Framework)
- 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
- 电脑二级VF有什么用
- Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
- 金华英语角.
- 手机软件如何制作
- 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
- 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
- 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
- Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
- 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
- python的访问器方法有哪些
- DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
- 在Ruby中对组合进行排序(Sorting a combination in Ruby)
- 网站开发的流程?
- 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
- 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
- 透明度错误IE11(Transparency bug IE11)
- linux的基本操作命令。。。