-formed template creation that can be properly displayed by the browser, so it can also be used as a static model. You can use it to create validated XML and HTML templates. Rather than writing logic or code, developers simply add tag attributes to the template. Next, these tag properties perform pre-established logic on the DOM (Document Object model).Sample Template:You can see that thymeleaf is mainly attributed to the HTML tag, the browser when parsing the HTML, when the detection of the att
)) .andExpect(status().isOk()) .andExpect(content().string(equalTo("Hello World"))); } } Use Mockservletcontext to build an empty webapplicationcontext, This allows the hellocontroller that we create to be created in the @before function and passed to the Mockmvcbuilders.standalonesetup () function.Note introduce the following to make the status, content, Equalto functions availableimport static org.hamcrest.Matchers.equalTo; import static org.springfr
)
Execution java -jar xxx.jar --spring.profiles.active=prod , you can observe that the service port is set to 3333 , that is, the configuration of the production environment (PROD)
According to the above experiment, we can summarize the multi-environment configuration ideas as follows:
application.propertiesThe common content is configured in and set to the spring.profiles.active=dev development environment as the default configuration
application-{profile}.properti
On the basis of a summary of the use of OAuth2.0 in the framework, the OAuth2.0 logout process of SSO single sign-on was drawn, today we take a look at the process of obtaining yoghurt information based on user token: /** * Obtain user information according to token * @param accesstoken * @return * @throws Exception */@RequestMapping (value = "/user/token/{ac Cesstoken} ", method = requestmethod.get) public Responsevo Getuserbytoken (@PathVariable (value =" Accesstoken ", required = True) Strin
]", "status": "1", "createTime": "2017-06-26" }, "roleIds": "100", "tokenInfo": { "accessToken":"4de55a69-e372-4766-acd3-1c419d6f2fda", "tokenType": "bearer", "webTokent":"uHSLjfJoQwU4t4PAqCzH1SN0fp7PUWKluPNS+x1dZ8R9Gx+NJkBI7w==", "refreshToken":"d3d71594-5c3f-4a68-a7e5-b8d21c4fa73b", "expiresIn": 34644, "scope": "read write" } Note: You can test with the Postman toolFramework Design idea: Provide independent Commonservice-sso microservices, provide com
The current distributed micro-service cloud architecture platform is built using MAVEN, so Common-service's generic service builds standalone system services according to MavenParticle-commonservice:spring Cloud system service root project, the root dependency of all service projects.Particle-commonservice-admin:spring Cloud
The current distributed micro-service cloud architecture platform is built using MAVEN, so Common-service's generic service builds separate system services according to Maven, with the following structure:650) this.width=650; "height=" 274 "src=" https://static.oschina.net/uploads/space/2017/1008/232457_Q1wq_3613013. PNG "width=" 489 "style=" Border:none;margin:auto;height:auto; "/>Particle-commonservice:sp
In this article we build our code based on the architecture diagram. According to the micro-service design idea, combined with Springcloud some excellent projects, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, using MAVEN technology to modular, service, atomized encapsulation and build, but also for the post-grayscale publishing, Continuous integration in advance to prepa
Spring Cloud Publishing list settings to build your system, see the Spring Cloud project page.How to run the Eureka serverExample Eureka Server;@SpringBootApplication@EnableEurekaServerpublic class Application {public static void Main (string[] args) {New Springapplicationbuilder (Application.class). Web (True). Run (args);}}I will not talk about the other, there is a lot of information about the registrat
understand the framework of technology or source of friends directly Add (Penguin) 2042849237Jeesz UIBased on BOOTSTRAP4Simple, intuitive, and powerful, the most popular HTML, CSS, and JS frameworks for developing responsive layouts, mobile device-first WEB projects.Designed for all developers, all application scenarios.Make front-end development faster and easier. All developers are quick to get started, all devices are adaptable, and all projects are available.DistributedDistributed services:
Gradle plug-in setting creates a build of the following Gradle section (it is a pseudo-code)Contracts {targetframework = ' JUNIT ' testmode = ' mockmvc ' Generatedtestsourcesdir = Project.file ("${project.buil Ddir}/generated-test-sources/contracts ") Contractsdsldir =" ${project.rootdir}/src/test/resources/contracts " basepackagefortests = ' org.springframework.cloud.verifier.tests ' Stubsoutputdir = Project.file ("${project.builddir} /stubs ")//The following properties is used when you wan
Chapter II General purpose purpose
Directory
User Requirements
Technical considerations
Operational considerations
Architecture architecture
Prescriptive examples
General-purpose cloud architectures are often considered scenarios for starting a
Oauth_code--------------------------------------------------------------Table structure for' Oauth_refresh_token '-- ----------------------------DROP TABLE IF EXISTS ' Oauth_refresh_token '; CREATE TABLE ' Oauth_refresh_token ' (' token_id ' varchar (256) DEFAULT NULL, ' token ' blob, ' authentication ' blob) ENGINE=innodb DEFAULT Charset=utf8;Note: The related table for OAuth is used to store user token information and authentication information.This section builds up first so many, behind the
We will analyze the whole project of Common-service and record the whole construction process, so that more followers can refer to the study.First, before building the common-service of Spring cloud, we need to prepare the technology:MAVEN (project Building), Spring Boot, Spring Cloud, microservices concept, decentralized thinking, distributed, etc., for top-of-the-line projects in Common-service, where we
We will analyze the whole project of Common-service and record the whole construction process, so that more followers can refer to the study.First, before building the common-service of Spring cloud, we need to prepare the technology:MAVEN (project Building), Spring Boot, Spring Cloud, microservices concept, decentralized thinking, distributed, etc., for top-of-the-line projects in Common-service, where we
This is a combination of most of the current enterprise's general needs, including the selection of technology is more stringent, harsh, not only to use the industry's most popular technology, but also with international standards, in the next 5-10 years can not out. As the architect of the company, we should also have a vision of the world, not only to give the company a good selection of technology, but also to quickly respond to business needs of enterprises, can quickly customized business.T
This is a combination of most of the current enterprise's general needs, including the selection of technology is more stringent, harsh, not only to use the industry's most popular technology, but also with international standards, in the next 5-10 years can not out. As the architect of the company, we should also have a vision of the world, not only to give the company a good selection of technology, but also to quickly respond to business needs of enterprises, can quickly customized business.T
This is a combination of most of the current enterprise's general needs, including the selection of technology is more stringent, harsh, not only to use the industry's most popular technology, but also with international standards, in the next 5-10 years can not out. As the architect of the company, we should also have a vision of the world, not only to give the company a good selection of technology, but also to quickly respond to business needs of enterprises, can quickly customized business.T
This is a combination of most of the current enterprise's general needs, including the selection of technology is more stringent, harsh, not only to use the industry's most popular technology, but also with international standards, in the next 5-10 years can not out. As the architect of the company, we should also have a vision of the world, not only to give the company a good selection of technology, but also to quickly respond to business needs of enterprises, can quickly customized business.T
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.