Rename spring-boot-developer-tools -> devtools

Fixes gh-3099
This commit is contained in:
Phillip Webb
2015-06-04 12:31:49 -07:00
parent 683c19ee8b
commit 983484f429
165 changed files with 507 additions and 437 deletions

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo;
public class Message {
public static String MESSAGE = "Message";
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class MyController {
@RequestMapping("/")
public ModelAndView get() {
ModelMap model = new ModelMap("message", Message.MESSAGE);
return new ModelAndView("hello", model);
}
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter;
@SpringBootApplication
public class SampleDevToolsApplication extends WebMvcAutoConfigurationAdapter {
public static void main(String[] args) {
SpringApplication.run(SampleDevToolsApplication.class, args);
}
}

View File

@@ -0,0 +1 @@
spring.developertools.remote.secret=secret

View File

@@ -0,0 +1,9 @@
h1 {
color: blue;
}
.content {
font-family: sans-serif;
border-top: 3px solid red;
padding-top: 30px;
}

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
<title>Hello</title>
</head>
<body>
<h1 layout:fragment="header" th:text="${message}">Header</h1>
<div layout:fragment="content">Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Cras ut fringilla augue, quis dictum
turpis. Sed tincidunt mi vel euismod viverra. Nulla facilisi.
Suspendisse mauris dolor, egestas ac leo at, porttitor ullamcorper
leo. Suspendisse consequat, justo ut rutrum interdum, nibh massa
semper dui, id sagittis tellus lectus at nibh. Etiam at scelerisque
nisi. Quisque vel eros tempor, fermentum sapien sed, gravida neque.
Fusce interdum sed dolor a semper. Morbi porta mauris a velit laoreet
viverra. Praesent et tellus vehicula, sagittis mi quis, faucibus urna.
Ut diam tortor, vehicula eget aliquam eget, elementum a odio. Fusce at
nisl sapien. Suspendisse potenti.</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
<title>Layout</title>
<link rel="stylesheet" href="/css/application.css" />
</head>
<body>
<h1 layout:fragment="header">Header</h1>
<div layout:fragment="content" class="content">Content</div>
</body>
</html>