同步操作将从 yuye/Martian 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Declarative API programming (DAP) framework
According to the traditional development method, if you want to develop a back-end interface, you need to divide into the following three steps
However, when we write an interface, the focus should be on business logic, which means that our focus should be on the second step, but usually the repeated workload of the first and third steps suffocates us, so I Arranged a bit, formulated a new development method, this new set of development methods is called a declarative API
So we play like this
interface
public interface TestService {
<Data type to return> selectList(TestDTO testDTO);
}
Implementation class
@MarsBean("testService")
public class TestServiceImpl implements TestService{
<Data type to return> selectList(TestDTO testDTO){
// Writing business logic
return data(Just return directly, it will automatically become json);
}
}
@MarsApi
public interface TestService {
@MarsReference(beanName = "testService")
<Data type to return> selectList(TestDTO testDTO);
}
At the core of this set of ideas is to treat the back end as a separate entity and completely separate it from the front end.Back-end write back-end business logic. If the front end needs data, then we declare an interface
Seeing this, everyone will definitely have questions, how to call the api on the front end, and how to operate the database on the back end? This requires you to move your fingers and check out my official website
First, the declarative API is a change to the front-end and back-end interaction methods, eliminating the need for a Controller.
In fact, this style is very common in microservices, such as Dubbo's api, Since the microservice interface can use interface to provide external services, we can also use it on the http interface.
In addition to the declarative API, we also provide the following features
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。