From fda151baff74e47f2b6ae80b17008451b9e345d9 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 8 Mar 2022 21:21:08 +0400 Subject: [PATCH 1/6] #1 -- add config for db --- build.gradle | 6 +++++- data/db.mv.db | Bin 0 -> 16384 bytes .../ru/ulstu/controller/IndexController.java | 10 +++++++++- src/main/java/ru/ulstu/model/News.java | 2 +- src/main/resources/application.properties | 8 ++++++++ src/main/resources/public/css/main.css | 6 +----- src/main/resources/static/favicon.ico | Bin 0 -> 8801 bytes src/main/resources/templates/index.html | 4 ++-- 8 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 data/db.mv.db create mode 100644 src/main/resources/static/favicon.ico diff --git a/build.gradle b/build.gradle index 309b542..f103d3e 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,11 @@ dependencies { implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf' implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect' - implementation group: 'org.javassist', name: 'javassist', version: '3.25.0-GA' + implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa' + implementation group: 'com.h2database', name:'h2' + implementation group: 'javax.xml.bind', name:'jaxb-api' + implementation group: 'org.javassist', name:'javassist' + implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: versionJetty implementation group: 'org.webjars', name: 'jquery', version: '3.6.0' diff --git a/data/db.mv.db b/data/db.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..8505c2cdaa6406a2030df0b887d6d42e05aec188 GIT binary patch literal 16384 zcmeI(PjAyO6aa9CjUf#-X$S7667&*Pw&VQst*k|@v<i=sy3Y_&U^uo z_#%8ePT)FiH+n!CXx-)I;JU5zr@y#|_ww8m%#QOixe`wO8Vx@yK?xytaycum^w&wQ zWFe@XOq8rtDyW}%GLV__LOUxbBU$M$uhnEaEDJq6%T<+Js)_IzS3LFUE`kjNKmY_l z00ck)1V8`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{VZYpK8zYG{BBQ3Ra!A>zwJ}iL z0N{498!Wvl!~E-^o}uH^2kao$iXr>23n8Vm^R2m&~) zzdV{c87c93ufTvF3@WPrnd&;*GyO~oNq7J}w?22d?MhiNVP505^YM*vUhpfL<);$vK)~7r9mOA~gp@dbH3H94MoQ~j%5D&5VnPGb{BNoECOZHu{Qyra@bojj;Rgv&@YzBBA90U)@>-!tZKDZf zHylt=XGe|AK|m1tr)FQQd=3B}s*Q1VaTz!l0$c`@BliIr+JDQFVh#=#H5@J02!r(t q)8OgZ|G%K&f3*7He|hi)bz@J@hXq?$DOe-|krI~|D}JT#|9=3rK;!5D literal 0 HcmV?d00001 diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index aaecabd..704e018 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -21,10 +21,10 @@
-
+

From d490fb813300d18352cb14b84d59a2f468212c7a Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 8 Mar 2022 21:28:49 +0400 Subject: [PATCH 2/6] #1 -- fix favicon --- data/db.mv.db | Bin 16384 -> 20480 bytes src/main/resources/static/favicon.ico | Bin 8801 -> 305822 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/data/db.mv.db b/data/db.mv.db index 8505c2cdaa6406a2030df0b887d6d42e05aec188..9e8355995daf126bb0ce886b8decd179ae7cc0e3 100644 GIT binary patch delta 899 zcmb7?O-tNB7{_-a-NI_Cpok!rtkm1EJTsY1*13ruq_j|I^&l!_lUWU}lXW){@wA{9 zy|nI7dMcEDfP(jagnpMoKS3wEdGYPgy<{ebC*EdRE?&m^-Sm0i27qLl!sSGeIxtE7c_u*HA_up0^W#a z+!KBpGkRHzw$nH(52km5zoL;mE2U# zAN*#^)?T-Mz{~*3yE!3#)ZbW~S(+VQ|0|Nu9EWR+QF%K wr?*HiQF48sY>=9T)y0Pe(xSl3p*@DfN@JwZZ)k;|rxJyQk^-twXcr3q0UInDzyJUM delta 266 zcmZozz}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1w-oo*aOr2bx|8WAwU)%SD|4T45s?uPbMJ^ zp#tEu1v@x7uT3CQYW%ywZPwaVT5YEx@$nz#L~=j=5p+dSwr$VU?WJE|n5F@EV;2&N z1b|K<p{R(A5B`a_|BH0w0%yO#w#onmMDpu!6dJn41tS9Md35+HBRrY zyh#_fJ_*(Gl=h?(r{7$V(K{pbIj)=2nDdJ>{zm0{VZYpK8zYG{BBQ3Ra!A>zwJ}iL z0N{498!Wvl!~E-^o}uH^2kao$iXr>23n8Vm^R2m&~) zzdV{c87c93ufTvF3@WPrnd&;*GyO~oNq7J}w?22d?MhiNVP505^YM*vUhpfL<);$vK)~7r9mOA~gp@dbH3H94MoQ~j%5D&5VnPGb{BNoECOZHu{Qyra@bojj;Rgv&@YzBBA90U)@>-!tZKDZf zHylt=XGe|AK|m1tr)FQQd=3B}s*Q1VaTz!l0$c`@BliIr+JDQFVh#=#H5@J02!r(t q)8OgZ|G%K&f3*7He|hi)bz@J@hXq?$DOe-|krI~|D}JT#|9=3rK;!5D From 5efcaa1a3ca9281178566468bc65eddf8bc4c772 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 9 Mar 2022 00:10:50 +0400 Subject: [PATCH 3/6] #1 -- add some business logic --- build.gradle | 7 +- data/db.mv.db | Bin 20480 -> 24576 bytes .../ulstu/configuration/MvcConfiguration.java | 3 +- .../ru/ulstu/controller/IndexController.java | 24 ++--- .../ru/ulstu/controller/NewsController.java | 37 ++++++++ src/main/java/ru/ulstu/model/BaseEntity.java | 83 ++++++++++++++++++ src/main/java/ru/ulstu/model/News.java | 32 +++++-- .../ru/ulstu/repository/NewsRepository.java | 7 ++ .../java/ru/ulstu/service/NewsService.java | 45 ++++++++++ src/main/resources/static/favicon.ico | Bin 305822 -> 15406 bytes src/main/resources/templates/default.html | 8 +- src/main/resources/templates/editNews.html | 26 ++++++ src/main/resources/templates/index.html | 4 - 13 files changed, 243 insertions(+), 33 deletions(-) create mode 100644 src/main/java/ru/ulstu/controller/NewsController.java create mode 100644 src/main/java/ru/ulstu/model/BaseEntity.java create mode 100644 src/main/java/ru/ulstu/repository/NewsRepository.java create mode 100644 src/main/java/ru/ulstu/service/NewsService.java create mode 100644 src/main/resources/templates/editNews.html diff --git a/build.gradle b/build.gradle index f103d3e..d5286fb 100644 --- a/build.gradle +++ b/build.gradle @@ -32,10 +32,11 @@ dependencies { versionSwagger = '2.5.0' } - implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web' - implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty' + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web' + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf' - implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation' + implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect' implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa' implementation group: 'com.h2database', name:'h2' diff --git a/data/db.mv.db b/data/db.mv.db index 9e8355995daf126bb0ce886b8decd179ae7cc0e3..2867556fbde610335892a5c43e5dd6d0feb53af0 100644 GIT binary patch literal 24576 zcmeHP%WvF77+ugG>HYBv)9&FEy?fLoleKVfl zeB)iR<&xj&1$VN2YwP{UmPAo31-JLRcWlYBNN4vJHE3zL(@^k@yzyL4+3;+Yb05AXy00Y1PFaQhy z1Hb?EaEwl$fovbvIg$ZKjH) z_;{5VOkvH5a8Y7MHMOH=#%7eHwxv@$idtCO@9ytKq0?WdD?4YB5j>yszdwb5!37TOy zmqV1o$(;T$StbL{WWW(GvGZQ?W^8_&nm=7@lTja8#8>Rpi-^{=LayXIEhm@#03*lIIAZvL^#S4lBAmAAc4d(xarUK1)q`;HlXTH_8JtOW6X~M$Yq+(^K1?Z%PdT?K002lxU zfPpi_KqllYIxrZyj^2pcmTKzOx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H0T2KI5C8!X z009u_gFsv4Z+ie1sxI|k%Viwu@ons<)GO56Djs@E`BJU*Ho>Yab;VzI20G9LOX}Kw?n35ijx~Jez=jg$K!?^S0;g{s=7t_g%JiVHXXOo}4d47Iz zN;suY9v+k9Pk(jo^W^z-az)O+CC|Q}k;#km>1;}lr{iNX9be4I$w-JONQaSPd^8GJ zazf6=(=&1shACH3$XGrcamIuY%ny=GB}o=WNfxA(Ws)*UWh!KtD8YxBh(t6>LSF?5 zJt5=M%kyWBbMW1Rubj`Ej}7wyZ_fTln)ZO1(awdL56u{uG5n;E*J`jRlT%sA$L)hl zx!lgLRQ|bnzFewewvxqKrj_op*@{MQ{Fg*$Ya>$~CO<`2gem3>?X@SPw40w4ea zAOHd&00JNY0{s)X>EE~X(aT{*vm_6C&}edayZF`qe}Bbm*S_m;eJq+-`+xNRvVZrT z^Otkf+Q0REJMw>W|9-9i_eQVT_6Cp-vwr3`daadscS}eZz4n7BwR+9+)~!4L@07p0 zWrW>n)@IkD^JMGL_Yv(KljetZcYc*w_T222idi8I2RQPov zzbodnlem`MV1aW*`6pAOHd&00JNY0w4eadm~`|zw__Tptt@n JgC6Vue*?VDS(X3* diff --git a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java index 9716493..502e5b1 100644 --- a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java @@ -20,7 +20,8 @@ import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; public class MvcConfiguration implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/{articlename:\\w+}"); + registry.addViewController("/index"); + registry.addViewController("/editNews"); } @Override diff --git a/src/main/java/ru/ulstu/controller/IndexController.java b/src/main/java/ru/ulstu/controller/IndexController.java index d70ef2f..d6f2fc0 100644 --- a/src/main/java/ru/ulstu/controller/IndexController.java +++ b/src/main/java/ru/ulstu/controller/IndexController.java @@ -9,28 +9,20 @@ package ru.ulstu.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; -import ru.ulstu.model.News; - -import java.util.GregorianCalendar; -import java.util.List; +import ru.ulstu.service.NewsService; @Controller public class IndexController { + private final NewsService newsService; + + public IndexController(NewsService newsService) { + this.newsService = newsService; + } + @GetMapping("/") public String index(Model model) { - model.addAttribute("news", List.of(new News("Открытие семинара", new GregorianCalendar(2022, 4, 1).getTime(), - "На кафере \"Информационные системы\" Ульяновского государственного технического университета состоится открытие постоянно действующего семинара \"Анализ данных и процессов\". Семинар планируется проводить ежемесячно."), - new News("Открытие семинара", new GregorianCalendar(2022, 4, 1).getTime(), - "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec laoreet enim dolor, vitae imperdiet mi consectetur et. Etiam posuere massa sed arcu pulvinar, eu tincidunt nunc vehicula. Integer interdum magna et orci eleifend convallis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum nulla eget lacus ultricies sagittis. Duis a lacus lacinia, pulvinar augue ultrices, vulputate arcu. Etiam facilisis justo nec ex tincidunt, sit amet tempus ante iaculis. Praesent non accumsan odio. Nunc faucibus mattis elit elementum lacinia. Sed orci augue, iaculis sed efficitur ac, faucibus nec orci. Vivamus sed tempor lectus. Mauris non nisi lobortis, varius tortor id, cursus orci. Sed gravida, est nec placerat ornare, mi metus mattis eros, vitae finibus lectus turpis ut felis. Mauris faucibus lorem orci, tempor bibendum leo varius et.\n" + - "\n" + - "Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Suspendisse ut vulputate enim, nec rutrum magna. Ut finibus dignissim arcu, gravida gravida eros vulputate a. Nulla dapibus eleifend egestas. Pellentesque malesuada venenatis fermentum. Proin suscipit mi enim, eu cursus neque luctus id. Sed nec sodales libero, vel finibus sem. Maecenas tincidunt sagittis risus a posuere. Donec quis velit lorem. Curabitur viverra libero quis nibh molestie, id suscipit lorem ultrices. Donec egestas lectus at justo tempus, et pulvinar magna dignissim. Donec eleifend pretium ante in maximus. Maecenas in malesuada ante. Donec euismod tincidunt tempus.\n" + - "\n" + - "Integer convallis euismod nibh non ornare. Sed sed sagittis enim, id tempus libero. Sed interdum dui ut orci ultrices efficitur. Aenean a tristique odio. Duis nec lacus sit amet metus fringilla posuere. Donec nisi felis, congue ut lorem in, efficitur dapibus leo. Sed vel urna porta, mollis nunc in, aliquam quam. Sed rhoncus justo nisi, vitae volutpat nibh feugiat at. Phasellus laoreet justo et elit aliquet, non tincidunt mauris sagittis. Nunc in quam velit. Aliquam lobortis turpis elit, ut aliquam dolor sagittis sed. Duis pellentesque eu turpis quis ullamcorper. Nullam in ullamcorper metus. Vestibulum sit amet tellus at nulla pretium commodo. Nulla eleifend lacus ex, ac sodales odio pellentesque in. Cras nec metus elit.\n" + - "\n" + - "Cras feugiat gravida magna, nec faucibus eros eleifend nec. Donec sodales ligula ut ante lacinia eleifend. Pellentesque bibendum nunc vel nulla luctus, ut vulputate turpis semper. Aenean quis massa bibendum, vehicula lorem et, fringilla arcu. Morbi nisi elit, pellentesque ac tincidunt quis, volutpat et felis. Duis ullamcorper velit mauris, sit amet egestas sem euismod ac. Proin sodales urna in libero scelerisque mollis.\n" + - "\n" + - "Curabitur sed massa tempus, ullamcorper nisl non, posuere mi. Integer nisl quam, venenatis ut dapibus vehicula, tempor nec metus. Suspendisse ultrices maximus lorem quis accumsan. Donec ac orci et dolor tincidunt pellentesque. In at tempor ligula. Nulla mi risus, malesuada tincidunt ante vel, rhoncus posuere massa. Pellentesque feugiat urna id arcu gravida euismod. Maecenas vulputate et lorem vitae molestie. Maecenas et nibh nec nisl facilisis faucibus. Vestibulum sed lacus elementum, interdum erat non, euismod odio. Proin ac lorem vel nibh efficitur egestas ac et nibh. Integer at enim."))); + model.addAttribute("news", newsService.getAll()); return "index"; } } diff --git a/src/main/java/ru/ulstu/controller/NewsController.java b/src/main/java/ru/ulstu/controller/NewsController.java new file mode 100644 index 0000000..d76fe1f --- /dev/null +++ b/src/main/java/ru/ulstu/controller/NewsController.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2021 Anton Romanov - All Rights Reserved + * You may use, distribute and modify this code, please write to: romanov73@gmail.com. + * + */ + +package ru.ulstu.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import ru.ulstu.model.News; +import ru.ulstu.service.NewsService; + +@Controller +public class NewsController { + private final NewsService newsService; + + public NewsController(NewsService newsService) { + this.newsService = newsService; + } + + @GetMapping("/editNews/{newsId}") + public String editNews(@PathVariable(value = "newsId") Integer id, Model model) { + model.addAttribute("news", (id != null && id != 0) ? newsService.getById(id) : new News()); + return "editNews"; + } + + @PostMapping("saveNews") + public String saveNews(@ModelAttribute News news) { + newsService.save(news); + return "redirect:/"; + } +} diff --git a/src/main/java/ru/ulstu/model/BaseEntity.java b/src/main/java/ru/ulstu/model/BaseEntity.java new file mode 100644 index 0000000..7946ec0 --- /dev/null +++ b/src/main/java/ru/ulstu/model/BaseEntity.java @@ -0,0 +1,83 @@ +package ru.ulstu.model; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.MappedSuperclass; +import javax.persistence.Version; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@MappedSuperclass +public abstract class BaseEntity implements Serializable, Comparable { + @Id + @GeneratedValue(strategy = GenerationType.TABLE) + private Integer id; + + @Version + private Integer version; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!getClass().isAssignableFrom(obj.getClass())) { + return false; + } + BaseEntity other = (BaseEntity) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (id == null ? 0 : id.hashCode()); + return result; + } + + @Override + public String toString() { + return getClass().getSimpleName() + "{" + + "id=" + id + + ", version=" + version + + '}'; + } + + @Override + public int compareTo(@NotNull BaseEntity o) { + return id != null ? id.compareTo(o.getId()) : -1; + } + + public void reset() { + this.id = null; + this.version = null; + } +} \ No newline at end of file diff --git a/src/main/java/ru/ulstu/model/News.java b/src/main/java/ru/ulstu/model/News.java index 9050698..7efb6dc 100644 --- a/src/main/java/ru/ulstu/model/News.java +++ b/src/main/java/ru/ulstu/model/News.java @@ -1,12 +1,22 @@ package ru.ulstu.model; +import javax.persistence.Entity; +import javax.persistence.Lob; import java.util.Date; -public class News { +@Entity +public class News extends BaseEntity { private final static int MAX_NEWS_TEXT_PREVIEW_LENGTH = 800; - private final String title; - private final Date date; - private final String text; + + private String title; + + private Date date; + + @Lob + private String text; + + public News() { + } public News(String title, Date date, String text) { this.title = title; @@ -22,12 +32,24 @@ public class News { return date; } + public void setDate(Date date) { + this.date = date; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setText(String text) { + this.text = text; + } + public String getText() { return text; } public String getPreview() { - return text.length() > MAX_NEWS_TEXT_PREVIEW_LENGTH + return text != null && text.length() > MAX_NEWS_TEXT_PREVIEW_LENGTH ? text.substring(0, MAX_NEWS_TEXT_PREVIEW_LENGTH) + "..." : text; } diff --git a/src/main/java/ru/ulstu/repository/NewsRepository.java b/src/main/java/ru/ulstu/repository/NewsRepository.java new file mode 100644 index 0000000..3aaf6bf --- /dev/null +++ b/src/main/java/ru/ulstu/repository/NewsRepository.java @@ -0,0 +1,7 @@ +package ru.ulstu.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.model.News; + +public interface NewsRepository extends JpaRepository { +} diff --git a/src/main/java/ru/ulstu/service/NewsService.java b/src/main/java/ru/ulstu/service/NewsService.java new file mode 100644 index 0000000..a4bcae3 --- /dev/null +++ b/src/main/java/ru/ulstu/service/NewsService.java @@ -0,0 +1,45 @@ +package ru.ulstu.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.model.News; +import ru.ulstu.repository.NewsRepository; + +import javax.validation.constraints.NotNull; +import java.util.Date; +import java.util.List; + +@Service +public class NewsService { + private final NewsRepository newsRepository; + + public NewsService(NewsRepository newsRepository) { + this.newsRepository = newsRepository; + } + + public void create(String title, String text) { + newsRepository.save(new News(title, new Date(), text)); + } + + public void create(News news) { + news.setDate(new Date()); + newsRepository.save(news); + } + + public void save(News news) { + if (news.getId() != null && (news.getId() != 0)) { + newsRepository.save(news); + } else { + create(news); + } + } + + public News getById(@NotNull Integer id) { + return newsRepository + .findById(id) + .orElseThrow(() -> new RuntimeException("Новость не найдена")); + } + + public List getAll() { + return newsRepository.findAll(); + } +} diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico index 4d4f220f9c4fbcc966f1bf92c84c60b0ab1ffb6f..dca8f8d67ea05ee0a483ce70dbc899e5084aeea1 100644 GIT binary patch literal 15406 zcmeI31+W!m8^;gQ-6?Tt5J>?Q1nF)>K=NRJ;smXjw>%Gj}EW!ki9GGoRJ z5C%EN~b<>kwlYUCe&_(7sZjVk`hNsJgVByHNXk}qFA zDO|X)y!YOFk~?>9$(l8*WXO;~5+q1q)P3ijcjV7M|5W`nYt~G)U$ttL{Povg#={tT z90t30@1A7KmQB_D=9_Pfl{0U~j}j${#EcnJqD70Q<`O%0Y)P6lsbtBLMT!?ME+HWy zs$Ti><>l$qr$&3mxNzZuTK~wABW1{tAu?dV0JY|E+-S=O z?aP!YqxxnZP7m{<-nnz<0@@!rawMP)`&7SveW_Hbk`ydhP}r-64I4_%oH+=@ezIrJZnR&tXptmJlt@yhOevW%Ws;UHTN-7YrA|YK z4psSW+O#p&sK?Ro@4ov^YSgG~G`7jg50oks^iKH_F*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)z0U;m+gn$qb0zyCt2mv7=1cZPP z5CTF#2nYcoAO!kEVC5Qh6(Jx5gn$qb0zyCt2mv7=1cZPP5CTF#2nYcoAOwVf5D)@F iKnMr{As_^VfDjM@LO=)z0U;m+gn$qb0zzN}f&T|{W5G)R diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index ab97906..01de6c5 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -22,7 +22,7 @@ From 6207da8fa5a315f33e13ee2b24f9ffcf5b5685c6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 9 Mar 2022 12:48:40 +0400 Subject: [PATCH 5/6] #1 -- add validation --- data/db.mv.db | Bin 24576 -> 28672 bytes .../ru/ulstu/controller/NewsController.java | 9 ++++++++- src/main/java/ru/ulstu/model/News.java | 3 +++ src/main/resources/public/css/main.css | 4 ++++ src/main/resources/templates/editNews.html | 5 ++++- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/data/db.mv.db b/data/db.mv.db index db9ad7d68730cb8f45d91a8f364aea9b6a28e9b4..f2a5f01bea579e0c6be94328e072eae670ce8703 100644 GIT binary patch literal 28672 zcmeHPO>g7I8J29zO}x9oszDkc>0y@HjlF>2@LMD=fh@6WVP$zM$=l7P#*iE(M!b@1 z%bP_HO;EJxp$O7T+ii>V&=$!b2$1v-6v!XQsVIt`+EZ^mG?xr#_%WiyU3nqbsqpGR zafTx22mk_r03dK-2y6rYzcB2fVL$*700aO5KmZT`1ONd*01yBK00BVYe}zC4 zsu{@e3KtCD|%*yEC zK5;ZdA-3+NsQ~n{M+bxY@N_V8WHk3rm{suN(offl1*K44x*d={K0O?jo~6~_TKe~; zqEM-XfUdl|`dQ(n!n5qAH&xY2_UvR2CwpFrg0QKqhFjHQ1&wWWwl&z+WLwO(`~?5< z0N*E@2ZMk-+|+sDaOgGg2w!4HXkiB*CHo!He}UBxkI0~Rj0Y#!AJIgL6MpIldxvCG z77LnKFrQ;5pALdyYxpKLH|(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M%C=AOHk_01yBI zy9lHPSMGo3b@YBYtD`rFlU>28e$+1Xc-lW6GWZz(KQo$A|35XF)(KtC{wv)3Z` znVDrHI}fvg1^>k&r%|PBRgv{Zeyk}TMU}kWrg)f$tiup6!wZ;&2d20fnc~ly>p)h3 zmVQ@sWtTG+iRwNpz+hH@aoSfv^iNvJi!y0YA#ui1A$GjclNCv`T=-1R7~20MQIf9L*xnEU^pM*M&682$g@ z#O+Z2f5a4RK6W<$di0Kea>pqD{~On1&2y$aH#5)uQ*53;&4s#oSwLE-n?{#LvVV84 zxudVpeQL`oPNzlAW~&od@bJ=M$p5b-weZ2d#n_Ple{QV?cyJ&91b_e#00KbZStgMB S|GEFo`p{YZzpEZo{{LS??+2Iw diff --git a/src/main/java/ru/ulstu/controller/NewsController.java b/src/main/java/ru/ulstu/controller/NewsController.java index d76fe1f..61cca27 100644 --- a/src/main/java/ru/ulstu/controller/NewsController.java +++ b/src/main/java/ru/ulstu/controller/NewsController.java @@ -8,6 +8,7 @@ package ru.ulstu.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; @@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.PostMapping; import ru.ulstu.model.News; import ru.ulstu.service.NewsService; +import javax.validation.Valid; + @Controller public class NewsController { private final NewsService newsService; @@ -30,8 +33,12 @@ public class NewsController { } @PostMapping("saveNews") - public String saveNews(@ModelAttribute News news) { + public String saveNews(@Valid @ModelAttribute News news, BindingResult result) { + if (result.hasErrors()) { + return "editNews"; + } newsService.save(news); + return "redirect:/"; } } diff --git a/src/main/java/ru/ulstu/model/News.java b/src/main/java/ru/ulstu/model/News.java index 7efb6dc..af66265 100644 --- a/src/main/java/ru/ulstu/model/News.java +++ b/src/main/java/ru/ulstu/model/News.java @@ -2,17 +2,20 @@ package ru.ulstu.model; import javax.persistence.Entity; import javax.persistence.Lob; +import javax.validation.constraints.NotEmpty; import java.util.Date; @Entity public class News extends BaseEntity { private final static int MAX_NEWS_TEXT_PREVIEW_LENGTH = 800; + @NotEmpty(message = "Заголовок не может быть пустым") private String title; private Date date; @Lob + @NotEmpty(message = "Текст новости не может быть пустым") private String text; public News() { diff --git a/src/main/resources/public/css/main.css b/src/main/resources/public/css/main.css index c207eae..b2b570d 100644 --- a/src/main/resources/public/css/main.css +++ b/src/main/resources/public/css/main.css @@ -19,4 +19,8 @@ .news-image { width: 300px; +} + +.error { + color: red; } \ No newline at end of file diff --git a/src/main/resources/templates/editNews.html b/src/main/resources/templates/editNews.html index 96aa36e..a6df9fb 100644 --- a/src/main/resources/templates/editNews.html +++ b/src/main/resources/templates/editNews.html @@ -11,14 +11,17 @@

Редактирование новости:

-

+

+ Не может быть пустым

+

+ Не может быть пустым

From b7953c4b715faba645d79edbdc31b21e54b69231 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 9 Mar 2022 15:09:17 +0400 Subject: [PATCH 6/6] #1 -- view news --- data/db.mv.db | Bin 28672 -> 32768 bytes .../ru/ulstu/controller/NewsController.java | 12 +++++++++ src/main/java/ru/ulstu/model/News.java | 3 +++ .../java/ru/ulstu/service/NewsService.java | 4 +++ src/main/resources/public/css/main.css | 8 ++++++ src/main/resources/templates/default.html | 2 +- src/main/resources/templates/editNews.html | 9 +++++-- src/main/resources/templates/index.html | 17 ++++++++++-- src/main/resources/templates/news.html | 25 ++++++++++++++++++ 9 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/templates/news.html diff --git a/data/db.mv.db b/data/db.mv.db index f2a5f01bea579e0c6be94328e072eae670ce8703..8fe3c2fececf3c4da42c6f2c33870fa4d36b9582 100644 GIT binary patch literal 32768 zcmeHP+m9Pp8Mn8)QAnE5AT^*;(5XwC6j_$-wY^>gYMouDS#@`l?mD4;Av!a2ycs(7 zxN})m@X{*?wX}Vy6d?gZ2%f9bLg*!kN5n;AB>n&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e(D(ymAe_davvDP`%^UdhY(#UbEFesw|gR zBqUw=Ns-s1y{_9q&F`T0ZV$Qln%!O(N!^-+y0umht=qb8nZ98WMYU~H@z&9Ht-FoZ zt5shmR#j2@hOJWart6AkdI9mgplW%6>B~xhWd+OF*KyS&x@rWvrCYXF)rjfI>!{Y) zX|~HNuOM{gL1aq3R^N6Ts8`!+xk$RRx7BLarA=wOx#f1+;XQQS@9w$ny4#gD)&#}ySH|;ymB2~yYl_0 z@jIR7POb9>y6wIpv>ny%)7pJQLc49@*i^eRCecQ2pc_}-FH$rq&a>PaMW%u3yX|hT zQ=@hY4W^Z$ErP)t*;Y}r-Ei*-r;gu8dF53K`=i(ea&T|E-%EgQHY9q@o_mYlMCd63 zuy@@~x4GL+jz@SmXopFt*W7Wtz1q&5sJ2IYK|=M`?p9pU?6opI7xv6L?U}~RJ)>rN zhFdOCqv@qKDE=qY;b*^_32)lM7~bKf9}BW7QJw8aOUt6pHcegg6P+z!;@KkUY#%0q zQJ#X8ugjcOz+!@orzulNurH8cQO`F^sTY+GuC~o~K z0Wp0ya&0;mE2%D>s+HTvOk<5zN^gov zNv8Lzh*u!IUKdg`;!}(#%4`vQAZ=XKG#1(g1ONd*01!AM0+akZ<^Lq*|5&qateqeK zr;GgKe*u_?|I<0sc>LdpLWMk1NCTK@1XHz@s+>;f=w;72{!jV;%fSDE|8pVa@zm6i zfd6x4>74n0;l%k6$fM^XJ0H(IIdei8XXl}az}_#DWWArhbH;McQY9uP>)BkQd@CoEm?x0*8O;+p zdkSJ!e~&eeT=R03m|Ru3+v4w|DUc! zf&Bjqn!G`?fB+x>2mk_rz*8a+$Ny9QEpq6D|6}8PR6ZHMyzl^?ABT@1se%lD@S getAll() { return newsRepository.findAll(); } + + public void delete(Integer id) { + newsRepository.deleteById(id); + } } diff --git a/src/main/resources/public/css/main.css b/src/main/resources/public/css/main.css index b2b570d..359a34c 100644 --- a/src/main/resources/public/css/main.css +++ b/src/main/resources/public/css/main.css @@ -23,4 +23,12 @@ .error { color: red; +} + +.fa { + color: black; +} + +.link-dark, .link-dark:visited, .link-dark:focus { + color: black; } \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index b744d63..819bd2a 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -17,7 +17,7 @@ - +