1. 네이버 서치어드바이저 적용
2. ADMIN버튼 제거
This commit is contained in:
@@ -23,6 +23,8 @@ public class IotdoorProperties {
|
|||||||
|
|
||||||
public static class Site {
|
public static class Site {
|
||||||
private String name;
|
private String name;
|
||||||
|
private String url;
|
||||||
|
private String ogImage;
|
||||||
private String adminTitle;
|
private String adminTitle;
|
||||||
private String email;
|
private String email;
|
||||||
private String phone;
|
private String phone;
|
||||||
@@ -42,6 +44,22 @@ public class IotdoorProperties {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOgImage() {
|
||||||
|
return ogImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOgImage(String ogImage) {
|
||||||
|
this.ogImage = ogImage;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAdminTitle() {
|
public String getAdminTitle() {
|
||||||
return adminTitle;
|
return adminTitle;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public class SecurityConfig {
|
|||||||
.requestMatchers(
|
.requestMatchers(
|
||||||
"/",
|
"/",
|
||||||
"/index.do",
|
"/index.do",
|
||||||
|
"/robots.txt",
|
||||||
|
"/sitemap.xml",
|
||||||
"/portfolio.do",
|
"/portfolio.do",
|
||||||
"/portfolio/**",
|
"/portfolio/**",
|
||||||
"/contact.do",
|
"/contact.do",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package kr.iotdoor.boot.web;
|
|||||||
|
|
||||||
import kr.iotdoor.boot.config.IotdoorProperties;
|
import kr.iotdoor.boot.config.IotdoorProperties;
|
||||||
import kr.iotdoor.boot.model.user.AdminUserPrincipal;
|
import kr.iotdoor.boot.model.user.AdminUserPrincipal;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.security.authentication.AnonymousAuthenticationToken;
|
import org.springframework.security.authentication.AnonymousAuthenticationToken;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -29,6 +30,11 @@ public class GlobalViewModelAdvice {
|
|||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ModelAttribute("canonicalUrl")
|
||||||
|
public String canonicalUrl(HttpServletRequest request) {
|
||||||
|
return request.getRequestURL().toString();
|
||||||
|
}
|
||||||
|
|
||||||
@ModelAttribute("subMainClass")
|
@ModelAttribute("subMainClass")
|
||||||
public String subMainClass() {
|
public String subMainClass() {
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -28,12 +28,16 @@ public class PublicPageController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/contact.do")
|
@GetMapping("/contact.do")
|
||||||
public String contact() {
|
public String contact(Model model) {
|
||||||
|
model.addAttribute("pageTitle", "문의하기");
|
||||||
|
model.addAttribute("pageDescription", "국제오토텍 자동문, 산업용자동문, 내풍압셔터, 오버헤드도어 시공 및 A/S 상담을 접수합니다.");
|
||||||
return "kr/iotdoor/cmty/contact/contact";
|
return "kr/iotdoor/cmty/contact/contact";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/portfolio.do")
|
@GetMapping("/portfolio.do")
|
||||||
public String portfolio(Model model) {
|
public String portfolio(Model model) {
|
||||||
|
model.addAttribute("pageTitle", "시공 사례");
|
||||||
|
model.addAttribute("pageDescription", "국제오토텍의 자동문, 산업용자동문, 내풍압셔터, 오버헤드도어 시공 사례와 제품 포트폴리오를 확인하세요.");
|
||||||
model.addAttribute("portfolioItems", portfolioService.getPortfolioItems());
|
model.addAttribute("portfolioItems", portfolioService.getPortfolioItems());
|
||||||
return "kr/iotdoor/cmty/portfolio/portfolio";
|
return "kr/iotdoor/cmty/portfolio/portfolio";
|
||||||
}
|
}
|
||||||
@@ -48,6 +52,8 @@ public class PublicPageController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.addAttribute("pageTitle", portfolio.getTitle());
|
||||||
|
model.addAttribute("pageDescription", portfolio.getSummary());
|
||||||
model.addAttribute("portfolio", portfolio);
|
model.addAttribute("portfolio", portfolio);
|
||||||
model.addAttribute("portfolioCount", portfolioService.count());
|
model.addAttribute("portfolioCount", portfolioService.count());
|
||||||
return "kr/iotdoor/cmty/portfolio/detail";
|
return "kr/iotdoor/cmty/portfolio/detail";
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ mybatis:
|
|||||||
iotdoor:
|
iotdoor:
|
||||||
site:
|
site:
|
||||||
name: 국제오토텍
|
name: 국제오토텍
|
||||||
|
url: https://iotdoor.kr
|
||||||
|
og-image: https://iotdoor.kr/resources/kr/iotdoor/comn/site/layout/image/template/logo.jpg
|
||||||
admin-title: 국제오토텍 관리자
|
admin-title: 국제오토텍 관리자
|
||||||
email: iotdoor1749@naver.com
|
email: iotdoor1749@naver.com
|
||||||
phone: 042-585-1749
|
phone: 042-585-1749
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
||||||
|
Sitemap: https://iotdoor.kr/sitemap.xml
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>https://iotdoor.kr/</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://iotdoor.kr/portfolio.do</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://iotdoor.kr/contact.do</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.7</priority>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
<!-- <a href="/" class="nav-item nav-link">About</a> -->
|
<!-- <a href="/" class="nav-item nav-link">About</a> -->
|
||||||
<a href="/portfolio.do" class="nav-item nav-link">Portfolio</a>
|
<a href="/portfolio.do" class="nav-item nav-link">Portfolio</a>
|
||||||
<a href="/contact.do" class="nav-item nav-link">Contact</a>
|
<a href="/contact.do" class="nav-item nav-link">Contact</a>
|
||||||
<a href="/mfuc/index.do" class="nav-item nav-link">ADMIN</a>
|
|
||||||
</div>
|
</div>
|
||||||
<!--<a href="" class="btn btn-primary rounded-0 py-4 px-lg-5 d-none d-lg-block">Get A Quote<i class="fa fa-arrow-right ms-3"></i></a>-->
|
<!--<a href="" class="btn btn-primary rounded-0 py-4 px-lg-5 d-none d-lg-block">Get A Quote<i class="fa fa-arrow-right ms-3"></i></a>-->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,13 +7,14 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<meta name="description" content="">
|
<meta name="description" th:content="${pageDescription != null ? pageDescription : siteInfo.description}" content="슬라이딩자동문, 산업용자동문, 내풍압셔터, 오버헤드도어를 중심으로 시공과 유지보수를 제공합니다.">
|
||||||
<meta property="og:title" content="">
|
<meta property="og:title" th:content="${pageTitle != null ? pageTitle + ' | ' + siteInfo.name : siteInfo.name}" content="국제오토텍">
|
||||||
<meta property="og:description" content="">
|
<meta property="og:description" th:content="${pageDescription != null ? pageDescription : siteInfo.description}" content="슬라이딩자동문, 산업용자동문, 내풍압셔터, 오버헤드도어를 중심으로 시공과 유지보수를 제공합니다.">
|
||||||
<meta property="og:url" content="">
|
<meta property="og:url" th:content="${canonicalUrl != null ? canonicalUrl : siteInfo.url}" content="https://iotdoor.kr">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:image" content="">
|
<meta property="og:image" th:content="${siteInfo.ogImage}" content="https://iotdoor.kr/resources/kr/iotdoor/comn/site/layout/image/template/logo.jpg">
|
||||||
<title th:text="${siteInfo.name}">국제오토텍</title>
|
<link rel="canonical" th:href="${canonicalUrl != null ? canonicalUrl : siteInfo.url}" href="https://iotdoor.kr">
|
||||||
|
<title th:text="${pageTitle != null ? pageTitle + ' | ' + siteInfo.name : siteInfo.name}">국제오토텍</title>
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link href="/resources/kr/iotdoor/comn/site/layout/image/template/favicon.ico" rel="icon" />
|
<link href="/resources/kr/iotdoor/comn/site/layout/image/template/favicon.ico" rel="icon" />
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,22 @@ class PublicPageControllerTest {
|
|||||||
void homePageRendersFully() throws Exception {
|
void homePageRendersFully() throws Exception {
|
||||||
mockMvc.perform(get("/"))
|
mockMvc.perform(get("/"))
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(content().string(org.hamcrest.Matchers.containsString("Footer Start")));
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("Footer Start")))
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("name=\"description\"")))
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("property=\"og:title\"")))
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("property=\"og:description\"")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void searchEngineFilesArePublic() throws Exception {
|
||||||
|
mockMvc.perform(get("/robots.txt"))
|
||||||
|
.andExpect(status().isOk())
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("User-agent: *")))
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("Sitemap: https://iotdoor.kr/sitemap.xml")));
|
||||||
|
|
||||||
|
mockMvc.perform(get("/sitemap.xml"))
|
||||||
|
.andExpect(status().isOk())
|
||||||
|
.andExpect(content().string(org.hamcrest.Matchers.containsString("https://iotdoor.kr/portfolio.do")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user