ssm整合详解

article/2025/10/28 2:07:11

最近做项目用到了ssm,虽然以前用过ssm但这段时间发现,用过不代表就会了,即使以前用过,但现在要搭一个ssm框架不看教程还是很难,最基本的maven仓库需要哪些坐标都搞不清楚,所以今天打算写篇博客梳理一下。

一.基础梳理

俗话说:工欲善其事必先利其器,要想搭建一个ssm架子,首先必须了解ssm都代表什么,每一部分在架子里担任什么角色行驶什么作用。

1.spring

spring是开放源代码的设计层框架,它解决的是业务层逻辑和其他各层之间的耦合问题,思想是,平时我们主动new对象,内存帮我们创建对象分配内存,现在是我们需要什么对象直接从spring容器里取出就OK,以此实现松耦合的功能。
这个框架的特征:
轻量,控制反转,面向切面,容器等
spring是一个很强大的工具,值得我们深究

2.mybatis

谈到mybatis这个框架,我也少不了吹一波彩虹屁,这个半自动化的ORM框架真的很强大,她的前生是apache下的ibatis,至于他改名为mybatis是因为换主人了。这是一个持久层框架,他可以定制sql和高级的映射功能,她帮我们避免了绝大多数的JDBC代码和结果集的获取等。
至于mybatis的特点,那首要说的就是方便灵活,可以说开发写一个项目mybatis帮我们完成了三分之一的工作。

3.springmvc

接下来说说springmvc,这是一个属于SpringFrameWork的后续产品,也是spring全家桶的一部分,学web开发的都知道web三层架构,springmvc就是V层及视图层。在我目前看来springmvc给我最优质的感觉就是参数绑定这个强大技能,减少了自己每次主动从request域里找数据的痛苦,而且他附加的json数据自动转换也十分方便,虽然这个功能自己也很容易实现,但总觉的没人家的好用。

4.介绍了ssm的组成,就进入整合了

ssm整合当然是在maven项目里方便啊,如果在动态web项目里整合,那jar包够你下一壶的了。
建立maven项目我不写步骤了,如果还不知道用maven里的哪个Artifact的,那就自己一个一个建着看吧,先把哪个干什么的搞清楚再来。
这里先把我的项目结构图附上
在这里插入图片描述

下面说说 每个文件代表的含义

  • src/main/java 这个不多说,就是放代码的 地方
  • sr/main/resources 存放资源文件的 地方,诸如配置文件
    ---- generatorConfig.xml 这个是配置逆向工程的配置文件
    ---- jdbc.properties 数据库连接数据文件
    ---- log4j.properties 日志配置文件
    ---- springmvc.xml springmvc的配置文件
    ---- springmybatis.xml 这个文件我把spring和mybatis 的配置文件放在一起了,因为整合里mybatis没几行代码,单独用一个文件浪费,嘿嘿嘿。

此处说明下,本文只介绍ssm整合,不介绍mybatis逆向工程,如果感兴趣的可以去看
mybatis逆向工程
下面介绍每个文件都写了什么内容

首先是jdbc.properties文件

driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/test_all?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT
username=root
password=123456
#\u5B9A\u4E49\u521D\u59CB\u8FDE\u63A5\u6570  
initialSize=0  
#\u5B9A\u4E49\u6700\u5927\u8FDE\u63A5\u6570  
maxActive=20  
#\u5B9A\u4E49\u6700\u5927\u7A7A\u95F2  
maxIdle=20  
#\u5B9A\u4E49\u6700\u5C0F\u7A7A\u95F2  
minIdle=1  
#\u5B9A\u4E49\u6700\u957F\u7B49\u5F85\u65F6\u95F4  
maxWait=60000

这个文件就不说了。如果这都看不懂劝你回头是岸吧。

接下来是log4j.properties

log4j.rootLogger=INFO,Console,File  
#\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0  
log4j.appender.Console=org.apache.log4j.ConsoleAppender  
log4j.appender.Console.Target=System.out  
#\u53EF\u4EE5\u7075\u6D3B\u5730\u6307\u5B9A\u65E5\u5FD7\u8F93\u51FA\u683C\u5F0F\uFF0C\u4E0B\u9762\u4E00\u884C\u662F\u6307\u5B9A\u5177\u4F53\u7684\u683C\u5F0F  
log4j.appender.Console.layout = org.apache.log4j.PatternLayout  
log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n  #\u6587\u4EF6\u5927\u5C0F\u5230\u8FBE\u6307\u5B9A\u5C3A\u5BF8\u7684\u65F6\u5019\u4EA7\u751F\u4E00\u4E2A\u65B0\u7684\u6587\u4EF6  
log4j.appender.File = org.apache.log4j.RollingFileAppender  
#\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55  
log4j.appender.File.File = logs/ssm.log  
#\u5B9A\u4E49\u6587\u4EF6\u6700\u5927\u5927\u5C0F  
log4j.appender.File.MaxFileSize = 10MB  
# \u8F93\u51FA\u6240\u4EE5\u65E5\u5FD7\uFF0C\u5982\u679C\u6362\u6210DEBUG\u8868\u793A\u8F93\u51FADEBUG\u4EE5\u4E0A\u7EA7\u522B\u65E5\u5FD7  
log4j.appender.File.Threshold = ALL  
log4j.appender.File.layout = org.apache.log4j.PatternLayout  
log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n

这里面可以不用知道,复制粘贴就好,感兴趣的可以去查下资料
接下来划重点了
先说spring-mybatie.xml

<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"  xmlns:context="http://www.springframework.org/schema/context"  xmlns:mvc="http://www.springframework.org/schema/mvc"  xsi:schemaLocation="http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd    http://www.springframework.org/schema/context    http://www.springframework.org/schema/context/spring-context-3.1.xsd    http://www.springframework.org/schema/mvc    http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">  <!-- 自动扫描 -->  <context:component-scan base-package="com.cc" />  <!-- 引入配置文件 -->  <bean id="propertyConfigurer"  class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">  <property name="location" value="classpath:jdbc.properties" />  </bean>  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"  destroy-method="close">  <property name="driverClassName" value="${driver}" />  <property name="url" value="${url}" />  <property name="username" value="${username}" />  <property name="password" value="${password}" />  <!-- 初始化连接大小 -->  <property name="initialSize" value="${initialSize}"></property>  <!-- 连接池最大数量 -->  <property name="maxActive" value="${maxActive}"></property>  <!-- 连接池最大空闲 -->  <property name="maxIdle" value="${maxIdle}"></property>  <!-- 连接池最小空闲 -->  <property name="minIdle" value="${minIdle}"></property>  <!-- 获取连接最大等待时间 -->  <property name="maxWait" value="${maxWait}"></property>  </bean>  <!-- spring和MyBatis完美整合,不需要mybatis的配置映射文件 -->  <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">  <property name="dataSource" ref="dataSource" />  <!-- 自动扫描mapping.xml文件 -->  <property name="mapperLocations" value="classpath:com/cc/mapper/*.xml"></property>  </bean>  <!-- DAO接口所在包名,Spring会自动查找其下的类 -->  <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">  <property name="basePackage" value="com.cc.dao" />  <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>  </bean>  <!-- (事务管理)transaction manager, use JtaTransactionManager for global tx -->  <bean id="transactionManager"  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  <property name="dataSource" ref="dataSource" />  </bean>  </beans>

说下这里面一些必须配置的类和所配置的类是干什么的

  • org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
    这个类相信都知道是干什么的,不说了
  • org.apache.commons.dbcp.BasicDataSource
    这个类就是给dbcp连接池加上jdbc.properties文件里的数据
  • org.mybatis.spring.SqlSessionFactoryBean
    SQLSessionFactoryBean类是mybatis的核心类,必须配置,这个类用来获取session工厂
  • org.mybatis.spring.mapper.MapperScannerConfigurer
    此类作用是取代手动添加Mapper,自动扫描完成接口代理,顾名思义,底部是代理模式实现
    在这里插入图片描述
  • org.springframework.jdbc.datasource.DataSourceTransactionManager
    事务管理类,可以暂时不了解

接下来是springmvc.xml配置文件

<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"  xmlns:context="http://www.springframework.org/schema/context"  xmlns:mvc="http://www.springframework.org/schema/mvc"  xsi:schemaLocation="http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd    http://www.springframework.org/schema/context    http://www.springframework.org/schema/context/spring-context-3.1.xsd    http://www.springframework.org/schema/mvc    http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">  <!-- 配置自动扫描包。让springmvc认为包下用了@controller注解的类的控制器 -->
<context:component-scan base-package="com.cc.controller"></context:component-scan><mvc:annotation-driven></mvc:annotation-driven>
<!-- 静态资源位置 -->
<mvc:resources location="/resource/**" mapping="/resource"/><!--避免IE执行AJAX时,返回JSON出现下载现象 -->  <bean id="mappingJacksonHttpMessageConverter"  class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">  <property name="supportedMediaTypes">  <list>  <value>text/html;charset=UTF-8</value>  </list>  </property>  </bean>  
<!--启动springmvc的注解功能,完成请求到pojo的映射 -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><property name="messageConverters"><list><!-- JSON转换器 -->	<ref bean="mappingJacksonHttpMessageConverter"/>	</list></property>
</bean>
<!-- 配置文件上传 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"><!--设置编码--><property name="defaultEncoding" value="utf-8"></property><!-- 文件大小的最大值 --><property name="maxUploadSize" value="10485760000"></property><!-- 内存中的最大值 --><property name="maxInMemorySize" value="40960"></property><!-- 启用是为了推迟文件解析,以便捕获文件大小异常 --><property name="resolveLazily" value="true"/>
</bean>
<!-- 配置视图解析器ViewResolve 因为此处配置的是ContentNegotingViewResolver试图解析器,所以可以配置多个试图解析器
通过order进行排序-->
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"><property name="order" value="1"></property><property name="mediaTypes"><map><!-- 告诉视图解析器,返回的类型为json格式 --><entry key="json" value="application/json" /><entry key="xml" value="application/xml" /><entry key="htm" value="text/htm" /></map></property><property name="defaultViews"><list><!-- ModelAndView里的数据变成JSON 此类把model里的数据转换为json格式--><bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" /></list></property><property name="ignoreAcceptHeader" value="true"></property>
</bean>
<!-- 视图跳转解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"><!-- 这里的配置是自动给后面action的方法return的字符串加上前缀和后缀,变成一个 可用的url地址 -->  <property name="prefix" value="/WEB-INF/jsp/" />  <property name="suffix" value=".jsp" />  
</bean>
</beans>

注解很详细,不说了,打字太累了
别忘了web.xml

<?xml version="1.0" encoding="UTF-8"?>  
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns="http://java.sun.com/xml/ns/javaee"  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"  version="3.0"><display-name>Archetype Created Web Application</display-name><!-- 编码过滤器 -->  <filter>  <filter-name>encodingFilter</filter-name>  <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  <async-supported>true</async-supported>  <init-param>  <param-name>encoding</param-name>  <param-value>UTF-8</param-value>  </init-param>  </filter>  <filter-mapping>  <filter-name>encodingFilter</filter-name>  <url-pattern>/*</url-pattern>  </filter-mapping>  <!-- Spring MVC servlet -->  <servlet>  <servlet-name>SpringMVC</servlet-name>  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>  <init-param>  <param-name>contextConfigLocation</param-name>  <param-value>classpath:spring-mvc.xml</param-value>  </init-param>  <load-on-startup>1</load-on-startup>  <async-supported>true</async-supported>  </servlet>  <servlet-mapping>  <servlet-name>SpringMVC</servlet-name>  <url-pattern>/</url-pattern>  </servlet-mapping>  <welcome-file-list>  <welcome-file>/index.jsp</welcome-file>  </welcome-file-list>  
</web-app>
5.配置文件搞定,现在来看看具体代码吧

在这里插入图片描述
user.java
三个字段 id,username,password

package com.cc.dao;import com.cc.domain.User;public interface UserMapper {int deleteByPrimaryKey(Integer id);int insert(User record);int insertSelective(User record);User selectByPrimaryKey(Integer id);int updateByPrimaryKeySelective(User record);int updateByPrimaryKey(User record);
}

UserMapper.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cc.dao.UserMapper" ><resultMap id="BaseResultMap" type="com.cc.domain.User" ><id column="id" property="id" jdbcType="INTEGER" /><result column="user_name" property="userName" jdbcType="VARCHAR" /><result column="password" property="password" jdbcType="VARCHAR" /><result column="age" property="age" jdbcType="INTEGER" /></resultMap><sql id="Base_Column_List" >id, user_name, password, age</sql><select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >select <include refid="Base_Column_List" />from user_twhere id = #{id,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >delete from user_twhere id = #{id,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.cc.domain.User" >insert into user_t (id, user_name, password, age)values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER})</insert><insert id="insertSelective" parameterType="com.cc.domain.User" >insert into user_t<trim prefix="(" suffix=")" suffixOverrides="," ><if test="id != null" >id,</if><if test="userName != null" >user_name,</if><if test="password != null" >password,</if><if test="age != null" >age,</if></trim><trim prefix="values (" suffix=")" suffixOverrides="," ><if test="id != null" >#{id,jdbcType=INTEGER},</if><if test="userName != null" >#{userName,jdbcType=VARCHAR},</if><if test="password != null" >#{password,jdbcType=VARCHAR},</if><if test="age != null" >#{age,jdbcType=INTEGER},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.cc.domain.User" >update user_t<set ><if test="userName != null" >user_name = #{userName,jdbcType=VARCHAR},</if><if test="password != null" >password = #{password,jdbcType=VARCHAR},</if><if test="age != null" >age = #{age,jdbcType=INTEGER},</if></set>where id = #{id,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.cc.domain.User" >update user_tset user_name = #{userName,jdbcType=VARCHAR},password = #{password,jdbcType=VARCHAR},age = #{age,jdbcType=INTEGER}where id = #{id,jdbcType=INTEGER}</update>
</mapper>
package com.cc.service;import com.cc.domain.User;public interface IUserService {public User getUserById(int userId);  }
package com.cc.serviceimpl;import javax.annotation.Resource;import org.springframework.stereotype.Service;import com.cc.dao.UserMapper;
import com.cc.domain.User;
import com.cc.service.IUserService;@Service("userService")  
public class UserServiceImpl implements IUserService {  @Resource  private UserMapper userDao;  public User getUserById(int userId) {  // TODO Auto-generated method stub  return this.userDao.selectByPrimaryKey(userId);  }  }  
package com.cc.controller;import javax.servlet.http.HttpServletRequest;import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;import com.cc.domain.User;@Controller  
@RequestMapping("/user")  public class UserController {  private static Logger log=LoggerFactory.getLogger(UserController.class);// /user/test?id=1@RequestMapping(value="/test",method=RequestMethod.GET)  public String test(HttpServletRequest request,Model model){  int userId = Integer.parseInt(request.getParameter("id"));  System.out.println("userId:"+userId);User user=null;if (userId==1) {user = new User();  user.setAge(11);user.setId(1);user.setPassword("123");user.setUserName("javen");}log.debug(user.toString());model.addAttribute("user", user);  return "index";  }  
}  
package com.cc.controller;import javax.servlet.http.HttpServletRequest;import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;import com.cc.domain.User;@Controller  
@RequestMapping("/user")  public class UserController {  private static Logger log=LoggerFactory.getLogger(UserController.class);// /user/test?id=1@RequestMapping(value="/test",method=RequestMethod.GET)  public String test(HttpServletRequest request,Model model){  int userId = Integer.parseInt(request.getParameter("id"));  System.out.println("userId:"+userId);User user=null;if (userId==1) {user = new User();  user.setAge(11);user.setId(1);user.setPassword("123");user.setUserName("javen");}log.debug(user.toString());model.addAttribute("user", user);  return "index";  }  
}  

在这里插入图片描述


http://chatgpt.dhexx.cn/article/IgSZDvTV.shtml

相关文章

SSM整合分页插件

目录 一.环境配置 1.分页插件依赖 2.在Mybatis里面配置的内容 二.使用分页插件 1.在ServiceImpl层开启分页插件&#xff08;即查询数据库前开启&#xff09; 2.控制器方法 3.jsp页面进行整理 4.效果 5. 样式 6.常用的数据说明 一.环境配置 1.分页插件依赖 <depend…

SSM整合总结

这几天学完spring&#xff0c;springMVC&#xff0c;mybatis后&#xff0c;这两天试着去整合ssm&#xff0c;整合过程并不顺利&#xff0c;一是基础知识有的忘了&#xff0c;细节不能把握住&#xff0c;造成各种报错.看了各种视频&#xff0c;翻阅各种文章&#xff0c;多多少少…

SSM整合shiro

1.完成ssm整合shiro 企业中老项目还在使用ssm框架。 准备数据库 数据结构 张三 -user:query user:add user:update user:delete 李四 ---》user:query user:add user:update 王五-----》user:query user:export 搭建ssm的环境 &#xff08;1&#xff09;创建一个maven的web工…

SSM整合

1、ssm整合原理 SSM框架是spring MVC &#xff0c;spring和mybatis框架的整合&#xff0c;是标准的MVC模式&#xff0c;将整个系统划分为表现层&#xff0c;controller层&#xff0c;service层&#xff0c;DAO层四层。 使用spring MVC负责请求的转发和视图管理 spring实现业…

SSM整合,手把手教程,详解思路讲解

前言 一&#xff0c;工程创建 1.新建Maven项目&#xff0c;项目架构增加web支持 2.Maven本地仓库配置 3.集成Tomcat&#xff0c;搭建web环境 二&#xff0c;导入依赖 三&#xff0c;配置文件编写 1.web环境配置文件 2.spring整合环境配置文件 2.1 controller层(spring…

SSM整合完整流程讲解

目录 一、SSM整合说明 1、各个框架担任的角色 2、两个Ioc容器的创建顺序 1&#xff09;SpringMVC中IOC容器的创建时间 2&#xff09;Spring中IOC容器的创建时间 3&#xff09;Spring提供的监听器ContextLoaderListener 二、SSM整合步骤 1、准备工作 1&#xff09;导入…

Unresolved Dependencies

在Android Studio的开发中&#xff0c;在软件中集成了ButterKnife插件&#xff0c;另外需要集成ButterKnife的jar包。因为本地没有现成的&#xff0c;所以在module的build.gradle文件中添加了如下代码&#xff1a; compile com.jakewharton:butterknife:7.0.1 结果报了如下错误…

Pycharm 出现Unresolved reference ‘‘ 错误的解决方法 --- 亲测有效

在用Pycharm写项目的时候的时候碰到一个很无语的问题 路径明明没有问题&#xff0c;运行也没有出错&#xff0c;但就是爆红&#xff0c;逼死强迫症啊。。。 多方查找最后解决了。步骤如下&#xff1a; File–>Settings–>Project Structure–>找到问题目录–>Sou…

PyCharm错误提示- Unresolved reference 的解决

使用PyCharm加载工程时,发生解析错误 原本这个工程是可以通过 python manange.py runserver 方式运行的,说明文件是正常的。关键在于PyCharm环境的问题。 查找了半天,安装一些网上的解决方式,尝试了以下几种方式: 1,修改忽略文件 File –>Settings –>Editor –…

Goland 提示 Unresolved reference 错误解决

之前一直正常的项目&#xff0c;莫名其妙的 database/sql 包下的方法、结构体等等IDE都无法识别&#xff0c;出现一堆Unresolved reference错误提示&#xff0c;但包导入路径可以正确定位&#xff0c;而且项目运行也正常&#xff0c;其他包都正常&#xff0c;另一个项目下同样使…

error LNK2019: unresolved external symbol

error LNK2019: unresolved external symbol&#xff1a;链接器找不到所需要的东西 此时ctrlF7进行编译&#xff0c;没有报错&#xff0c;在这个程序中调用的是Log函数&#xff0c;我们实际上并没有这个函数&#xff0c; 我们有的函数是Logr函数&#xff0c;在编译过程中编译器…

Unresolved reference ‘matplotlib‘解决方法

首先打开最左边的file-settings 然后点这个添加 找想添加的 最后点最下面的install Package 就可以啦

快速解决Pycharm中unresolved reference

在用Pycharm时老是报红&#xff0c;虽然不影响运行&#xff0c;但是真的很不好看。 如下&#xff1a; 根据网上大部分教程设置source root&#xff0c;设置之后还是没有变化。 然后我发现了这个东西&#xff0c;真的是立即生效&#xff0c;就是不知道改了之后有没有什么后遗症…

解决unresolved symbol _RamfuncsLoadEnd

问题描述 移植大佬的文件之后&#xff0c;发现报错 问题解决 添加F28335.cmd到工程中

Redisson cannot use an unresolved DNS server address问题解决

概述 本文记录Mac IDEA开发&#xff0c;公司 远程办公时遇到的两个问题&#xff0c;记录一下。 问题 cannot use an unresolved DNS server address: [fe80::1%en0]:53 在家里&#xff0c;连上公司的VPN后&#xff0c;即可打开公司内网&#xff0c;远程办公。一切正常。某…

解决模块Unresolved Link问题

修改内容为下面的&#xff0c;请复制以下内容&#xff08;图中大小写有误&#xff09;&#xff01;&#xff01; Solver_SF/CarSim S-Function 此时就可以修改Simfile name了

c语言1 unresolved externals,出现了 unresolved external symbol _main和1 unresolved externals这是什么问题?...

满意答案 nyjspj 2014.01.18 采纳率&#xff1a;53% 等级&#xff1a;12 已帮助&#xff1a;5918人 {} 数量不匹配 #include #include "process.h" #include "stdio.h" #include "sqstack.h" template void convert(T n,T m) { T e; char c; …

AndroidStudio Unresolved reference

在学习Kotlin过程中&#xff0c;出现了两次在activity_main.xml中已注册id&#xff0c;但是在MainActivity.kt中无法找到该Button的情况。 后面发现是没有在build.gradle中导入 kotin-android-extensions’的包&#xff0c;导致无法 import kotlinx.android.synthetic.main.a…

Unresolved reference ‘SQLAlchemy‘

引用不到包的问题&#xff1b;setting已经添加了&#xff0c;外面是是报错 最后直接用pip下载包 pip install flask_sqlalchemy 就ok了

PyCharm报错Unresolved Reference

两台不同的电脑&#xff0c;开发相同的软件时&#xff0c;一台电脑总是报错Unresolved Reference&#xff0c;解决办法如下&#xff1a;