Tomcat

项目1——博客系统

女生的网名这么多〃 提交于 2020-12-29 11:54:02
一、绪言 今天又来更新博文了,学习Java也已经有一段时间了,经过这段时间的学习,我对Java有了更深一层的理解。从刚开始的HelloWorld到了现在的小型网页项目,这中间也经历了很多。话不多说,下面开始我的项目阐述,由于是第一次做,必然存在很多瑕疵,希望大家多多指正。。。。。 二、项目介绍 关于博客系统这个项目呢,相信很多小伙伴也做过,所谓一个莎士比亚也能创造出一千个哈姆雷特,每个人都有每个人的思路,大佬不就是靠吸取各种精华修炼而成的吗?所以有趣的灵魂和解法对于程序员来说还是有比要多接触接触。进入正题,提到博客系统,我们脑子里首先能想到的无非就是增删查改这些操作,不过也确实是这样。所以项目的内容就由此得出,如下: 1.登录系统 2.新建博客 3.查看文章详情 4.对文章进行修改 5.新增文章 6.删除选中文章 这就是博客系统的大体操作,其实也不难想嘛哈哈哈哈,不过说起来容易,做起来可就难了。大家一起来探讨下,我们要实现以上功能,要用什么技术去实现呢,是JavaSpringBoot框架,还是Web开发呢,介于本人目前的水平有限,还是选用了简单的Web技术,后端开发引用了maven配置依赖包,Servlet处理及响应客户端的请求。为了预处理用户的请求,并且可以对HttpServletResponse实现后处理,使用了过滤器Filter,当然它也可响应用户的请求。对于前端方面呢

Spring Boot 整合 Activiti 6.0.0 工作流引擎开发

非 Y 不嫁゛ 提交于 2020-12-29 09:21:57
本教程基于Activiti 6.0.0 ,着力介绍工作流引擎Activiti6.0.0引擎和Spring Boot的整合开发,帮助初学者入门。 Spring Boot 整合 Activiti 6.0.0 工作流引擎开发 本教程基于Activiti 6.0.0 ,着力介绍工作流引擎Activiti6.0.0引擎和Spring Boot的整合开发入门教程。 开发环境 1. Tomcat 7.0.78 2. JDK 7+ 3. Activiti 6.0.0 4. spring-boot-starter-parent 1.4.2.RELEASE 5. mybatis maven <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring-boot-starter-basic</artifactId> <version>${activiti.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org

spring boot 中文乱码问题

会有一股神秘感。 提交于 2020-12-29 07:28:05
在刚接触spring boot 2.0的时候,遇到了一些中文乱码的问题,网上找了一些解决方法。 这里自己做个汇总。 在application.properties文件中添加: 1 spring.http.encoding.force= true 2 spring.http.encoding.charset=UTF-8 3 spring.http.encoding.enabled= true 4 server.tomcat.uri-encoding=UTF-8 有如上配置后,拦截器中返回的中文已经不乱码了,但是controller中返回的数据依旧乱码。 需要在@RequestMapping(这一类定义请求路径的注解)中增加produces="text/plain;charset=UTF-8" 但是这样就得要限定请求的数据类型,并且需要在每个请求里都加上这个,工作比较繁杂。 可以自己写一个配置文件类,继承WebMvcConfigurationSupport,代码如下: 1 @Configuration 2 public class CustomMVCConfiguration extends WebMvcConfigurationSupport{ 3 4 @Bean 5 public HttpMessageConverter<String> responseBodyConverter(

springboot+vue2.x 解决session跨域失效问题

心不动则不痛 提交于 2020-12-29 05:22:27
服务端SpringBoot2.x :localhost:8082 前端Vue2.x :localhost:81 前后端的端口号不同,为跨域,导致前端访问后端时,每次访问都新生产一个sessionID。解决如下: 后端: 1.添加过滤器: package com.nsoft.gkzp.syscore.config.filter; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.* ; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Configuration //内置tomcat运行不加它没问题,但后来改为用外置tomcat时,启动后过滤器会失效,后来查明原因需要加上@Configuration才行 @WebFilter

Invalid initial heap size. Could not create the Java virtual machine

醉酒当歌 提交于 2020-12-29 03:01:54
问题 I've faced the next problem: I'm trying to start Tomcat manually via startup.bat, but it seems not to show any results, then I've tried to run shutdown.bat and the console shows next: D:\apache-tomcat-7.0.35\bin>startup.bat Using CATALINA_BASE: "D:\apache-tomcat-7.0.35" Using CATALINA_HOME: "D:\apache-tomcat-7.0.35" Using CATALINA_TMPDIR: "D:\apache-tomcat-7.0.35\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_31" Using CLASSPATH: "D:\apache-tomcat-7.0.35\bin\bootstrap.jar;D:\apache

Invalid initial heap size. Could not create the Java virtual machine

自作多情 提交于 2020-12-29 02:59:07
问题 I've faced the next problem: I'm trying to start Tomcat manually via startup.bat, but it seems not to show any results, then I've tried to run shutdown.bat and the console shows next: D:\apache-tomcat-7.0.35\bin>startup.bat Using CATALINA_BASE: "D:\apache-tomcat-7.0.35" Using CATALINA_HOME: "D:\apache-tomcat-7.0.35" Using CATALINA_TMPDIR: "D:\apache-tomcat-7.0.35\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_31" Using CLASSPATH: "D:\apache-tomcat-7.0.35\bin\bootstrap.jar;D:\apache

Zabbix实现自动发现端口并监控

谁说我不能喝 提交于 2020-12-29 02:31:58
转自天宇骑士博客随笔,表示感谢 # vim discovertcpport.sh #!/bin/bash port_array=(`netstat -tnlp|egrep -i "$1"|awk {'print $4'}|awk -F':' '{if ($NF~/^[0-9]*$/) print $NF}'|sort |uniq 2>/dev/null`) length=${#port_array[@]} printf "{\n" printf '\t'"\"data\":[" for ((i=0;i<$length;i++)) do printf '\n\t\t{' printf "\"{ #TCP_PORT }\":\"${port_array[$i]}\"}" if [ $i -lt $[$length-1] ];then printf ',' fi done printf "\n\t]\n" printf "}\n" 2、 客户端增加discovery的key UserParameter=tcpportlisten[*],/usr/local/zabbix_agent/sbin/discovertcpport.sh "$1" 我实验环境是zabbix 3.0 在tcpportlisten后面必须加上[*],否则会显示Item does not allow

Spring MVC using tomcat, maven and intelliJ Error

独自空忆成欢 提交于 2020-12-27 07:17:13
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina

Spring MVC using tomcat, maven and intelliJ Error

守給你的承諾、 提交于 2020-12-27 07:17:10
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina

Spring MVC using tomcat, maven and intelliJ Error

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-27 07:16:28
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina