<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[netsram的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/netsram</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; netsram]]></copyright><item><title><![CDATA[springboot中数据集在freemark中渲染与Controller中组装优缺点]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/133820694</link><guid>https://blog.youkuaiyun.com/netsram/article/details/133820694</guid><author>netsram</author><pubDate>Sat, 14 Oct 2023 07:34:52 +0800</pubDate><description><![CDATA[哪种方式性能更好，取决于具体的应用场景和需求。如果应用对性能要求非常高，而且视图逻辑相对简单，那么在Controller中生组装可能是更好的选择。如果应用对开发效率和代码可维护性有更高的要求，而且视图逻辑比较复杂，那么使用模板引擎可能是更好的选择。从性能的角度来看，Controller中生组装通常更高效，因为避免了模板解析和渲染的过程。但是，如果需要考虑代码的可维护性、模块化以及开发效率等因素，使用模板引擎可能是更好的选择。]]></description><category></category></item><item><title><![CDATA[sql命令查询mysql数据使用磁盘空间大小]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/128141853</link><guid>https://blog.youkuaiyun.com/netsram/article/details/128141853</guid><author>netsram</author><pubDate>Fri, 02 Dec 2022 09:06:51 +0800</pubDate><description><![CDATA[查询所有数据库占用磁盘空间大小。查询某个库所使用的磁盘空间大小。]]></description><category></category></item><item><title><![CDATA[springboot+layui +ueditor前端及后端完整开发案例]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/127506488</link><guid>https://blog.youkuaiyun.com/netsram/article/details/127506488</guid><author>netsram</author><pubDate>Thu, 27 Oct 2022 16:42:49 +0800</pubDate><description><![CDATA[springboot+layui +ueditor前端及后端完整开发案例]]></description><category></category></item><item><title><![CDATA[解决springboot项目@DeleteMapping请求出错，页面显示Request method ‘POST‘ not supported的方法]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/121156054</link><guid>https://blog.youkuaiyun.com/netsram/article/details/121156054</guid><author>netsram</author><pubDate>Fri, 05 Nov 2021 09:20:52 +0800</pubDate><description><![CDATA[springboot项目中以 PUT 方法提交表单数据，@DeleteMapping请求时出错，页面显示Request method ‘POST’ not supported

原因是 Spring 的 hiddenmethod 过滤器默认是关闭的，在表单提交的数据中 "_method" 数据并不起作用。解决方法：

application.properties中将 hiddenmethod 过滤器设置为启用即可


#启用hiddenMethod过滤器
spring.mvc.hiddenmethod.fi]]></description><category></category></item><item><title><![CDATA[新建Mysql数据库后增加远程连接权限解决message from server: “Host ‘**‘ is not allowed to connect的2种方法]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/121114114</link><guid>https://blog.youkuaiyun.com/netsram/article/details/121114114</guid><author>netsram</author><pubDate>Wed, 03 Nov 2021 09:58:39 +0800</pubDate><description><![CDATA[新建Mysql数据库后(这里数据库版本为8)，远程访问数据库报错，不允许本机ip访问：java.sql.SQLException: null, message from server: "Host '**' is not allowed to connect to this MySQL server"

原因是连接账号没有设置远程访问权限，需要修改MySQL数据库中该账号权限。


#druid配置-MYSQL
#spring.datasource.driver-class-name=com.mysql..]]></description><category></category></item><item><title><![CDATA[使用Idea中的persistence从数据库中自动生成实体类]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/120996041</link><guid>https://blog.youkuaiyun.com/netsram/article/details/120996041</guid><author>netsram</author><pubDate>Wed, 27 Oct 2021 17:17:16 +0800</pubDate><description><![CDATA[打开persistence窗口



如果没有persistence那么打开 file-》projectpersistence 添加



打开persistence面板





添加一个数据库，选择需要加入的数据库类型

填写相应信息



选择相应数据库驱动



可以进行一下连接测试



选择数据源，选择生成类存放位置，可以定义前缀名和后缀名





选择数据表和生成规则

提交后会生成相应的实体类








...]]></description><category></category></item><item><title><![CDATA[从GitLab中克隆项目到本地Idea]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/120965089</link><guid>https://blog.youkuaiyun.com/netsram/article/details/120965089</guid><author>netsram</author><pubDate>Tue, 26 Oct 2021 09:26:27 +0800</pubDate><description><![CDATA[从gitlab网站上选择需要克隆的项目：





复制该项目的http克隆地址到剪贴板



打开idea选择file-》new-》project from version control



选择仓库url ，类型git，粘贴路径到url中，设置目录名，点击克隆



等待克隆完成，选择打开窗口。



完成克隆 ，进行自己的代码管理










...]]></description><category></category></item><item><title><![CDATA[idea中 推送和获取git中的代码]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/120955855</link><guid>https://blog.youkuaiyun.com/netsram/article/details/120955855</guid><author>netsram</author><pubDate>Mon, 25 Oct 2021 17:27:22 +0800</pubDate><description><![CDATA[git常用命令简介：

clone：通常是从远程主机克隆一个版本库
	remote：用于管理主机名
	fetch：将远程主机的最新内容拉到本地，它不会更新本地分支，只会下载，用户在检查了以后决定是否合并到工作本机分支中
	pull：将远程主机的最新内容拉下来后直接合并，即：git pull = git fetch + git merge，这样可能会产生冲突，需要手动解决
	push：会将本地更改提交到远程分支，push完成后，其他人就可以下载该变更
	merge： 的意思为代码合并融入，是将之前的代码...]]></description><category></category></item><item><title><![CDATA[将IDEA中的spring boot工程文件推送到GitLab上]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/120948532</link><guid>https://blog.youkuaiyun.com/netsram/article/details/120948532</guid><author>netsram</author><pubDate>Mon, 25 Oct 2021 15:51:24 +0800</pubDate><description><![CDATA[新建一个项目













项目时注意选择可见级别，创建完成后根据需求在IDEA中执行处理命令





Git 全局设置


git config --global user.name "你的git账号"
git config --global user.email "你的git邮箱"

推送现有文件夹

git add . --当前目录下的所有文件

git commit -m "my first commit" --提交说明,可以修改成自己想写的内容


cd existin...]]></description><category></category></item><item><title><![CDATA[GitLab重置管理员密码及网址]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/120946687</link><guid>https://blog.youkuaiyun.com/netsram/article/details/120946687</guid><author>netsram</author><pubDate>Mon, 25 Oct 2021 10:18:13 +0800</pubDate><description><![CDATA[因为忘记管理员密码及服务器地址变更记录一下操作。

控制台重置管理员及用户密码

GitLab 提供了一个 Rake 任务来使用用户名重置用户的密码，可以通过以下命令调用：

切换目录：cd /opt/gitlab/bin


cd /opt/gitlab/bin

重置命令


sudo gitlab-rake "gitlab:password:reset"

GitLab 要求输入用户名、密码和密码确认。

Rake 任务还将用户名作为参数，如下例所示：


sudo gitlab-rake "gitl]]></description><category></category></item><item><title><![CDATA[Spring MVC模型中Controller、Servie、Impl、Dao、Model文件的联系与运用]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/119386718</link><guid>https://blog.youkuaiyun.com/netsram/article/details/119386718</guid><author>netsram</author><pubDate>Wed, 04 Aug 2021 22:17:27 +0800</pubDate><description><![CDATA[View：视图层，展示数据内容；
Controller：控制层，一般用“controller”关键字定义；
Model：数据层，一般用“.model”、“.dao”、“.service”等关键字定义。

工作流程如下：web页面--&gt;Controller--&gt;service--&gt;interface--&gt;IMPL--&gt;DAO--&gt;DATABASE

文件功能及作用：

Controller：控制层，接收和返回客户端的参数，作用是整个工程对外访问的地方。

SERVICE：业]]></description><category></category></item><item><title><![CDATA[自定义spring data jpa全局接口]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/119377372</link><guid>https://blog.youkuaiyun.com/netsram/article/details/119377372</guid><author>netsram</author><pubDate>Wed, 04 Aug 2021 10:10:49 +0800</pubDate><description><![CDATA[1、创建一个JPA全局继承接口MyBaseRepository


/**
 * 通用DAO接口
 * 使用@NoRepositoryBean标注，Spring Data Jpa在启动时就不会去实例化BaseRepository这个接口
 * 继承JpaRepository，JpaSpecificationExecutor
 */
@NoRepositoryBean
public interface MyBaseRepository&lt;T, ID extends Serializable&gt; ext]]></description><category></category></item><item><title><![CDATA[学习Spring Data JPA 中实体类使用基础]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/119282800</link><guid>https://blog.youkuaiyun.com/netsram/article/details/119282800</guid><author>netsram</author><pubDate>Mon, 02 Aug 2021 13:40:24 +0800</pubDate><description><![CDATA[Spring Data JPA 是 Spring 基于 ORM 框架、JPA 规范的基础上封装的一套JPA应用框架，可使开发者用极简的代码即可实现对数据的访问和操作。它提供了包括增删改查等在内的常用功能，且易于扩展！学习并使用 Spring Data JPA 可以极大提高开发效率！

在Spring Data JPA中JPA提供了一种简单高效的方式来管理Java对象（POJO）到关系数据库的映射，此类Java对象称为JPA实体或简称实体。实体通常与底层数据库中的单个关系表相关联，每个实体的实例表示数据库表格]]></description><category></category></item><item><title><![CDATA[springboot 中 druid+jpa+MYSQL数据库配置]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/119257240</link><guid>https://blog.youkuaiyun.com/netsram/article/details/119257240</guid><author>netsram</author><pubDate>Sat, 31 Jul 2021 20:01:44 +0800</pubDate><description><![CDATA[Druid来自于阿里的一个开源连接池能够提供强大的监控和扩展功能，Spring Boot默认不支持Druid和jpa，需要引入依赖。

1、引入依赖包


&lt;!--druid--&gt;
    &lt;!-- https://mvnrepository.com/artifact/com.alibaba/druid --&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.alibaba&lt;/groupId&gt;
      &lt;artif]]></description><category></category></item><item><title><![CDATA[IDEA工程-数据库连接-mysql连接]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/119053311</link><guid>https://blog.youkuaiyun.com/netsram/article/details/119053311</guid><author>netsram</author><pubDate>Sat, 24 Jul 2021 09:46:17 +0800</pubDate><description><![CDATA[首先打开pom.xml，找到mysql连接驱动添加依赖
mysql6以及以上，在项目创建后由IDEA自动添加的依赖，自动添加的依赖是没有版本号&lt;version&gt;&lt;/version&gt;。
依赖代码：
&lt;dependency&gt;
  &lt;groupId&gt;mysql&lt;/groupId&gt;
  &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
  &lt;scope&gt;runtime&lt;/s]]></description><category></category></item><item><title><![CDATA[对MySQL进行新建、修改外键级联删除操作]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/109090669</link><guid>https://blog.youkuaiyun.com/netsram/article/details/109090669</guid><author>netsram</author><pubDate>Thu, 15 Oct 2020 09:40:28 +0800</pubDate><description><![CDATA[主要进行子表操作
一、如果表已建
1.先删除约束值（如果存在）
ALTER TABLE `子表`
DROP FOREIGN KEY `唯一约束值`;
2.更新子表
ALTER TABLE `子表`
ADD CONSTRAINT `唯一约束值` FOREIGN KEY (`id`) REFERENCES `主表` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT;

二、新建表


CREATETABLE`子表`(

`id`INT(11)UNSIGNED...]]></description><category></category></item><item><title><![CDATA[windows服务器无法检查更新，因为未运行服务的解决办法]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/90258555</link><guid>https://blog.youkuaiyun.com/netsram/article/details/90258555</guid><author>netsram</author><pubDate>Thu, 16 May 2019 10:41:37 +0800</pubDate><description><![CDATA[简单暴力：

关闭windows update 服务
删除c:\windows\SoftwareDistribution\datestore里面的所有内容
然后再开启windows update 服务
可以了。


]]></description><category></category></item><item><title><![CDATA[windows错误：无法读取服务器服务的性能数据]]></title><link>https://blog.youkuaiyun.com/netsram/article/details/90258351</link><guid>https://blog.youkuaiyun.com/netsram/article/details/90258351</guid><author>netsram</author><pubDate>Thu, 16 May 2019 10:34:08 +0800</pubDate><description><![CDATA[无法读取服务器服务的性能数据。数据部分的前四个字节(DWORD)包含状态代码，第二个四位字节包含 IOSB.Status，下一个四位字节包含 OSB.Information。
（
打开注册表，在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfNet\Performance\下添加REG_DWORD值(双字节值)： Disable P...]]></description><category></category></item></channel></rss>