chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

Spring Boot的注解原理是什么

5jek_harmonyos ? 來源:博客園 ? 作者:kosamino ? 2021-08-27 09:24 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

首先,先看SpringBoot的主配置類:

@SpringBootApplicationpublic class StartEurekaApplication

{

public static void main(String[] args)

{

SpringApplication.run(StartEurekaApplication.class, args);

}

}

點進@SpringBootApplication來看,發(fā)現@SpringBootApplication是一個組合注解。

@Target(ElementType.TYPE)

@Retention(RetentionPolicy.RUNTIME)

@Documented@Inherited@SpringBootConfiguration@EnableAutoConfiguration@ComponentScan(excludeFilters = {

@Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),

@Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })

public @interface SpringBootApplication {

}

首先我們先來看 @SpringBootConfiguration:

@Target({ElementType.TYPE})

@Retention(RetentionPolicy.RUNTIME)

@Documented@Configurationpublic @interface SpringBootConfiguration {

}

可以看到這個注解除了元注解以外,就只有一個@Configuration,那也就是說這個注解相當于@Configuration,所以這兩個注解作用是一樣的,它讓我們能夠去注冊一些額外的Bean,并且導入一些額外的配置。

那@Configuration還有一個作用就是把該類變成一個配置類,不需要額外的XML進行配置。所以@SpringBootConfiguration就相當于@Configuration。進入@Configuration,發(fā)現@Configuration核心是@Component,說明Spring的配置類也是Spring的一個組件。

@Target({ElementType.TYPE})

@Retention(RetentionPolicy.RUNTIME)

@Documented@Componentpublic @interface Configuration {

@AliasFor(

annotation = Component.class

String value() default “”;

}

繼續(xù)來看下一個@EnableAutoConfiguration,這個注解是開啟自動配置的功能。

@Target({ElementType.TYPE})

@Retention(RetentionPolicy.RUNTIME)

@Documented@Inherited@AutoConfigurationPackage@Import({AutoConfigurationImportSelector.class})

public @interface EnableAutoConfiguration {

String ENABLED_OVERRIDE_PROPERTY = “spring.boot.enableautoconfiguration”;

Class《?》[] exclude() default {};

String[] excludeName() default {};

}

可以看到它是由 @AutoConfigurationPackage,@Import(EnableAutoConfigurationImportSelector.class)這兩個而組成的,我們先說@AutoConfigurationPackage,他是說:讓包中的類以及子包中的類能夠被自動掃描到spring容器中。

@Target({ElementType.TYPE})

@Retention(RetentionPolicy.RUNTIME)

@Documented@Inherited@Import({Registrar.class})

public @interface AutoConfigurationPackage {

}

使用@Import來給Spring容器中導入一個組件 ,這里導入的是Registrar.class。來看下這個Registrar:

static class Registrar implements ImportBeanDefinitionRegistrar, DeterminableImports {

Registrar() {

}

public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {

AutoConfigurationPackages.register(registry, (new AutoConfigurationPackages.PackageImport(metadata)).getPackageName());

}

public Set《Object》 determineImports(AnnotationMetadata metadata) {

return Collections.singleton(new AutoConfigurationPackages.PackageImport(metadata));

}

}

就是通過以上這個方法獲取掃描的包路徑,可以debug查看具體的值:

那metadata是什么呢,可以看到是標注在@SpringBootApplication注解上的DemosbApplication,也就是我們的主配置類Application:

其實就是將主配置類(即@SpringBootApplication標注的類)的所在包及子包里面所有組件掃描加載到Spring容器。因此我們要把DemoApplication放在項目的最高級中(最外層目錄)。

看看注解@Import(AutoConfigurationImportSelector.class),@Import注解就是給Spring容器中導入一些組件,這里傳入了一個組件的選擇器:AutoConfigurationImportSelector。

可以從圖中看出AutoConfigurationImportSelector 繼承了 DeferredImportSelector 繼承了 ImportSelector,ImportSelector有一個方法為:selectImports。將所有需要導入的組件以全類名的方式返回,這些組件就會被添加到容器中。

public String[] selectImports(AnnotationMetadata annotationMetadata) {

if (!this.isEnabled(annotationMetadata)) {

return NO_IMPORTS;

} else {

AutoConfigurationMetadata autoConfigurationMetadata = AutoConfigurationMetadataLoader.loadMetadata(this.beanClassLoader);

AutoConfigurationImportSelector.AutoConfigurationEntry autoConfigurationEntry =

this.getAutoConfigurationEntry(autoConfigurationMetadata, annotationMetadata);

return StringUtils.toStringArray(autoConfigurationEntry.getConfigurations());

}

}

會給容器中導入非常多的自動配置類(xxxAutoConfiguration);就是給容器中導入這個場景需要的所有組件,并配置好這些組件。

有了自動配置類,免去了我們手動編寫配置注入功能組件等的工作。那是如何獲取到這些配置類的呢,看看下面這個方法:

protected AutoConfigurationImportSelector.AutoConfigurationEntry

getAutoConfigurationEntry(AutoConfigurationMetadata autoConfigurationMetadata, AnnotationMetadata annotationMetadata) {

if (!this.isEnabled(annotationMetadata)) {

return EMPTY_ENTRY;

} else {

AnnotationAttributes attributes = this.getAttributes(annotationMetadata);

List《String》 configurations = this.getCandidateConfigurations(annotationMetadata, attributes);

configurations = this.removeDuplicates(configurations);

Set《String》 exclusions = this.getExclusions(annotationMetadata, attributes);

this.checkExcludedClasses(configurations, exclusions);

configurations.removeAll(exclusions);

configurations = this.filter(configurations, autoConfigurationMetadata);

this.fireAutoConfigurationImportEvents(configurations, exclusions);

return new AutoConfigurationImportSelector.AutoConfigurationEntry(configurations, exclusions);

}

}

我們可以看到getCandidateConfigurations()這個方法,他的作用就是引入系統(tǒng)已經加載好的一些類,到底是那些類呢:

protected List《String》 getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) {

List《String》 configurations = SpringFactoriesLoader.loadFactoryNames(this.getSpringFactoriesLoaderFactoryClass(), this.getBeanClassLoader());

Assert.notEmpty(configurations,

“No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.”);

return configurations;

}

public static List《String》 loadFactoryNames(Class《?》 factoryClass, @Nullable ClassLoader classLoader) {

String factoryClassName = factoryClass.getName();

return (List)loadSpringFactories(classLoader).getOrDefault(factoryClassName, Collections.emptyList());

}

會從META-INF/spring.factories中獲取資源,然后通過Properties加載資源:

private static Map《String, List《String》》 loadSpringFactories(@Nullable ClassLoader classLoader) {

MultiValueMap《String, String》 result = (MultiValueMap)cache.get(classLoader);

if (result != null) {

return result;

} else {

try {

Enumeration《URL》 urls = classLoader !=

null ? classLoader.getResources(“META-INF/spring.factories”) : ClassLoader.getSystemResources(“META-INF/spring.factories”);

LinkedMultiValueMap result = new LinkedMultiValueMap();

while(urls.hasMoreElements()) {

URL url = (URL)urls.nextElement();

UrlResource resource = new UrlResource(url);

Properties properties = PropertiesLoaderUtils.loadProperties(resource);

Iterator var6 = properties.entrySet().iterator();

while(var6.hasNext()) {

Map.Entry《?, ?》 entry = (Map.Entry)var6.next();

String factoryClassName = ((String)entry.getKey()).trim();

String[] var9 = StringUtils.commaDelimitedListToStringArray((String)entry.getValue());

int var10 = var9.length;

for(int var11 = 0; var11 《 var10; ++var11) {

String factoryName = var9[var11];

result.add(factoryClassName, factoryName.trim());

}

}

}

cache.put(classLoader, result);

return result;

} catch (IOException var13) {

throw new IllegalArgumentException(“Unable to load factories from location [META-INF/spring.factories]”, var13);

}

}

}

可以知道SpringBoot在啟動的時候從類路徑下的META-INF/spring.factories中獲取EnableAutoConfiguration指定的值,將這些值作為自動配置類導入到容器中,自動配置類就生效,幫我們進行自動配置工作。以前我們需要自己配置的東西,自動配置類都幫我們完成了。如下圖可以發(fā)現Spring常見的一些類已經自動導入。

接下來看@ComponentScan注解,@ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class), @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) }),這個注解就是掃描包,然后放入spring容器。

@ComponentScan(excludeFilters = {

@Filter(type = FilterType.CUSTOM,classes = {TypeExcludeFilter.class}),

@Filter(type = FilterType.CUSTOM,classes = {AutoConfigurationExcludeFilter.class})})

public @interface SpringBootApplication {}

總結下@SpringbootApplication:就是說,他已經把很多東西準備好,具體是否使用取決于我們的程序或者說配置。

接下來繼續(xù)看run方法:

public static void main(String[] args) {

SpringApplication.run(Application.class, args);

}

來看下在執(zhí)行run方法到底有沒有用到哪些自動配置的東西,我們點進run:

public ConfigurableApplicationContext run(String.。. args) {

//計時器

StopWatch stopWatch = new StopWatch();

stopWatch.start();

ConfigurableApplicationContext context = null;

Collection《SpringBootExceptionReporter》 exceptionReporters = new ArrayList();

this.configureHeadlessProperty();

//監(jiān)聽器

SpringApplicationRunListeners listeners = this.getRunListeners(args);

listeners.starting();

Collection exceptionReporters;

try {

ApplicationArguments applicationArguments = new DefaultApplicationArguments(args);

ConfigurableEnvironment environment = this.prepareEnvironment(listeners, applicationArguments);

this.configureIgnoreBeanInfo(environment);

Banner printedBanner = this.printBanner(environment);

//準備上下文

context = this.createApplicationContext();

exceptionReporters = this.getSpringFactoriesInstances(SpringBootExceptionReporter.class, new Class[]{ConfigurableApplicationContext.class}, context);

//預刷新context

this.prepareContext(context, environment, listeners, applicationArguments, printedBanner);

//刷新context

this.refreshContext(context);

//刷新之后的context

this.afterRefresh(context, applicationArguments);

stopWatch.stop();

if (this.logStartupInfo) {

(new StartupInfoLogger(this.mainApplicationClass)).logStarted(this.getApplicationLog(), stopWatch);

}

listeners.started(context);

this.callRunners(context, applicationArguments);

} catch (Throwable var10) {

this.handleRunFailure(context, var10, exceptionReporters, listeners);

throw new IllegalStateException(var10);

}

try {

listeners.running(context);

return context;

} catch (Throwable var9) {

this.handleRunFailure(context, var9, exceptionReporters, (SpringApplicationRunListeners)null);

throw new IllegalStateException(var9);

}

}

那我們關注的就是 refreshContext(context); 刷新context,我們點進來看。

private void refreshContext(ConfigurableApplicationContext context) {

refresh(context);

if (this.registerShutdownHook) {

try {

context.registerShutdownHook();

}

catch (AccessControlException ex) {

// Not allowed in some environments.

}

}

}

我們繼續(xù)點進refresh(context);

protected void refresh(ApplicationContext applicationContext) {

Assert.isInstanceOf(AbstractApplicationContext.class, applicationContext);

((AbstractApplicationContext) applicationContext).refresh();

}

他會調用 ((AbstractApplicationContext) applicationContext).refresh();方法,我們點進來看:

public void refresh() throws BeansException, IllegalStateException {

synchronized (this.startupShutdownMonitor) {

// Prepare this context for refreshing.

prepareRefresh();

// Tell the subclass to refresh the internal bean factory.

ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();

// Prepare the bean factory for use in this context.

prepareBeanFactory(beanFactory);

try {

// Allows post-processing of the bean factory in context subclasses.

postProcessBeanFactory(beanFactory);

// Invoke factory processors registered as beans in the context.

invokeBeanFactoryPostProcessors(beanFactory);

// Register bean processors that intercept bean creation.

registerBeanPostProcessors(beanFactory);

// Initialize message source for this context.

initMessageSource();

// Initialize event multicaster for this context.

initApplicationEventMulticaster();

// Initialize other special beans in specific context subclasses.

onRefresh();

// Check for listener beans and register them.

registerListeners();

// Instantiate all remaining (non-lazy-init) singletons.

finishBeanFactoryInitialization(beanFactory);

// Last step: publish corresponding event.

finishRefresh();

}catch (BeansException ex) {

if (logger.isWarnEnabled()) {

logger.warn(“Exception encountered during context initialization - ” +

“cancelling refresh attempt: ” + ex);

}

// Destroy already created singletons to avoid dangling resources.

destroyBeans();

// Reset ‘active’ flag.

cancelRefresh(ex);

// Propagate exception to caller.

throw ex;

}finally {

// Reset common introspection caches in Spring‘s core, since we

// might not ever need metadata for singleton beans anymore.。.

resetCommonCaches();

}

}

}

由此可知,就是一個spring的bean的加載過程。繼續(xù)來看一個方法叫做 onRefresh():

protected void onRefresh() throws BeansException {

// For subclasses: do nothing by default.

}

他在這里并沒有直接實現,但是我們找他的具體實現:

比如Tomcat跟web有關,我們可以看到有個ServletWebServerApplicationContext:

@Overrideprotected void onRefresh() {

super.onRefresh();

try {

createWebServer();

}

catch (Throwable ex) {

throw new ApplicationContextException(“Unable to start web server”, ex);

}

}

可以看到有一個createWebServer();方法他是創(chuàng)建web容器的,而Tomcat不就是web容器,那是如何創(chuàng)建的呢,我們繼續(xù)看:

private void createWebServer() {

WebServer webServer = this.webServer;

ServletContext servletContext = getServletContext();

if (webServer == null && servletContext == null) {

ServletWebServerFactory factory = getWebServerFactory();

this.webServer = factory.getWebServer(getSelfInitializer());

}

else if (servletContext != null) {

try {

getSelfInitializer().onStartup(servletContext);

}

catch (ServletException ex) {

throw new ApplicationContextException(“Cannot initialize servlet context”,

ex);

}

}

initPropertySources();

}

factory.getWebServer(getSelfInitializer());他是通過工廠的方式創(chuàng)建的。

public interface ServletWebServerFactory {

WebServer getWebServer(ServletContextInitializer.。. initializers);

}

可以看到 它是一個接口,為什么會是接口。因為我們不止是Tomcat一種web容器。

我們看到還有Jetty,那我們來看TomcatServletWebServerFactory:

@Overridepublic WebServer getWebServer(ServletContextInitializer.。. initializers) {

Tomcat tomcat = new Tomcat();

File baseDir = (this.baseDirectory != null) ? this.baseDirectory

: createTempDir(“tomcat”);

tomcat.setBaseDir(baseDir.getAbsolutePath());

Connector connector = new Connector(this.protocol);

tomcat.getService().addConnector(connector);

customizeConnector(connector);

tomcat.setConnector(connector);

tomcat.getHost().setAutoDeploy(false);

configureEngine(tomcat.getEngine());

for (Connector additionalConnector : this.additionalTomcatConnectors) {

tomcat.getService().addConnector(additionalConnector);

}

prepareContext(tomcat.getHost(), initializers);

return getTomcatWebServer(tomcat);

}

那這塊代碼,就是我們要尋找的內置Tomcat,在這個過程當中,我們可以看到創(chuàng)建Tomcat的一個流程。

如果不明白的話, 我們在用另一種方式來理解下,大家要應該都知道stater舉點例子。

《dependency》

《groupId》org.springframework.boot《/groupId》

《artifactId》spring-boot-starter-data-redis《/artifactId》《/dependency》《dependency》

《groupId》org.springframework.boot《/groupId》

《artifactId》spring-boot-starter-freemarker《/artifactId》《/dependency》

首先自定義一個stater。

《parent》

《groupId》org.springframework.boot《/groupId》

《artifactId》spring-boot-starter-parent《/artifactId》

《version》2.1.4.RELEASE《/version》

《relativePath/》《/parent》《groupId》com.zgw《/groupId》《artifactId》gw-spring-boot-starter《/artifactId》《version》1.0-SNAPSHOT《/version》《dependencies》

《dependency》

《groupId》org.springframework.boot《/groupId》

《artifactId》spring-boot-autoconfigure《/artifactId》

《/dependency》《/dependencies》

我們先來看maven配置寫入版本號,如果自定義一個stater的話必須依賴spring-boot-autoconfigure這個包,我們先看下項目目錄。

public class GwServiceImpl implements GwService{

@Autowired

GwProperties properties;

@Override

public void Hello()

{

String name=properties.getName();

System.out.println(name+“說:你們好啊”);

}

}

我們做的就是通過配置文件來定制name這個是具體實現。

@Component@ConfigurationProperties(prefix = “spring.gwname”)

public class GwProperties {

String name=“zgw”;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

}

這個類可以通過@ConfigurationProperties讀取配置文件。

@Configuration@ConditionalOnClass(GwService.class) //掃描類

@EnableConfigurationProperties(GwProperties.class) //讓配置類生效

public class GwAutoConfiguration {

/**

* 功能描述 托管給spring

* @author zgw

* @return

*/

@Bean

@ConditionalOnMissingBean

public GwService gwService()

{

return new GwServiceImpl();

}

}

這個為配置類,為什么這么寫因為,spring-boot的stater都是這么寫的,我們可以參照他仿寫stater,以達到自動配置的目的,然后我們在通過spring.factories也來進行配置。

org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.gw.GwAutoConfiguration

然后這樣一個簡單的stater就完成了,然后可以進行maven的打包,在其他項目引入就可以使用。

鏈接:cnblogs.com/cmt/p/14553189.html

責任編輯:haq

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • spring
    +關注

    關注

    0

    文章

    341

    瀏覽量

    15849
  • Boot
    +關注

    關注

    0

    文章

    154

    瀏覽量

    37613

原文標題:10000 字講清楚 Spring Boot 注解原理

文章出處:【微信號:harmonyos_developer,微信公眾號:harmonyos_developer】歡迎添加關注!文章轉載請注明出處。

收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    TLE989x EvalBoard with TQFP/LQFP spring socket v01_1 評估板深度解析

    TLE989x EvalBoard with TQFP/LQFP spring socket v01_1 評估板深度解析 在電子設計領域,評估板是我們探索和驗證新器件性能的重要工具。今天,我們就來
    的頭像 發(fā)表于 12-20 10:40 ?772次閱讀

    深入理解?RK3506 U-Boot?重定位:從代碼到原理

    在嵌入式系統(tǒng)中,U-Boot?作為引導加載程序,其啟動流程的核心環(huán)節(jié)之一就是 重定位(Relocation) 。對于?RK3506?這類基于?ARM Cortex-A?架構的芯片,重定位的本質是將
    的頭像 發(fā)表于 11-28 07:05 ?357次閱讀
    深入理解?RK3506 U-<b class='flag-5'>Boot</b>?重定位:從代碼到原理

    一款基于Java+Spring Boot+Vue的智慧隨訪管理系統(tǒng)源碼

    智慧隨訪管理系統(tǒng)源碼,一款基于Java+Spring Boot+Vue的B/S架構醫(yī)院隨訪管理系統(tǒng)源碼,采用前后端分離技術(Ant-Design+MySQL5),具有自主版權和落地案例。 隨訪管理
    的頭像 發(fā)表于 11-13 15:38 ?323次閱讀
    一款基于Java+<b class='flag-5'>Spring</b> <b class='flag-5'>Boot</b>+Vue的智慧隨訪管理系統(tǒng)源碼

    U-Boot 無法識別 NAND怎么解決?

    U-Boot 無法識別 NAND
    發(fā)表于 09-03 06:37

    Spring攔截器:你的請求休想逃過我的五指山!

    Spring框架中,攔截器(Interceptor)是一種強大的機制,它允許開發(fā)者在請求處理的不同階段插入自定義邏輯。WebApplicationContext作為Spring Web應用的上下文容器,為攔截器的配置和管理提供了基礎支持。
    的頭像 發(fā)表于 07-26 11:25 ?614次閱讀
    <b class='flag-5'>Spring</b>攔截器:你的請求休想逃過我的五指山!

    fn_u-boot-spl.bin和u-boot-spl.bin區(qū)別是什么?請問如何從u-boot-spl.bin生成fn_u-boot-spl.bin?

    fn_u-boot-spl.bin = bootrom頭 + u-boot-spl.bin ;生成過程見后面代碼片段; bootrom頭(格式詳見) + u-boot-spl.bin(標準的一級
    發(fā)表于 07-11 07:58

    STM32H747的BOOT1是哪個管腳?

    STM32H747 datasheet里面沒有BOOT1,只有BOOT0。請問boot1是哪個管腳?還是就是沒有,沒有的話 BOOT0 上下拉分別什么啟動配置?
    發(fā)表于 07-11 07:44

    飛凌嵌入式ElfBoard ELF 1板卡-uboot編譯u-boot/u-boot.bin/u-boot.imx

    u-boot文件就是編譯流程章節(jié)講的,鏈接器將鏈接各.o文件之后生成的.elf文件,該文件中包含了大量的調試信息、地址信息和注釋信息,不能被直接執(zhí)行,需要轉換成為可執(zhí)行的u-boot.bin文件,而
    發(fā)表于 05-22 11:24

    銳寶智聯(lián)精彩亮相Japan IT Week Spring 2025

    Japan IT Week Spring 2025于 4 月 23 日至 25 日在日本東京有明國際會展中心隆重舉行。該展是日本乃至亞洲最具影響力的IT消費電子展之一,吸引來自全球各地的IT企業(yè)
    的頭像 發(fā)表于 04-30 16:43 ?903次閱讀

    瑞薩RA芯片的Boot模式簡介

    RA芯片在上電或通過芯片復位引腳進行復位時,會根據MD引腳的電平來進入不同的芯片操作模式:“Single-chip Mode”或者“Boot Mode”。
    的頭像 發(fā)表于 04-09 10:52 ?2165次閱讀
    瑞薩RA芯片的<b class='flag-5'>Boot</b>模式簡介

    瑞薩RZT2H CR52雙核BOOT流程和例程代碼分析

    以雙CR52 Core為例,說明了T2H多核系統(tǒng)的BOOT流程。
    的頭像 發(fā)表于 04-02 09:28 ?2029次閱讀
    瑞薩RZT2H CR52雙核<b class='flag-5'>BOOT</b>流程和例程代碼分析

    為什么BOOT_CFG1_1和BOOT_CFG1_6為L時不能寫入?

    和“MIMXRT1060-EVKB Board User Manual”使用以下設置進行編寫,但發(fā)生了錯誤。 BOOT_MODE0:H BOOT_MODE1:L BOOT_CFG1_0:H
    發(fā)表于 03-28 08:11

    U-Boot 和 Bootloader,99% 的工程師都分不清?

    嵌入式軟件工程師聽說過 u-boot 和 bootloader,但很多工程師依然不知道他們到底是啥。 ? 今天就來簡單講講?u-boot 和 bootloader?的內容以及區(qū)別
    的頭像 發(fā)表于 03-25 20:47 ?1636次閱讀

    請問stm32u545這種spi帶boot的和不帶boot的有什么區(qū)別?

    請問這種spi帶boot的和不帶boot的有什么區(qū)別?
    發(fā)表于 03-10 07:16

    通過Boot swap實現瑞薩RL78/F24 MCU固件升級

    本文主要說明如何使用已有的程序更新flash中的固件。使用這種方法代碼閃存分為兩個區(qū)域:執(zhí)行區(qū)域和臨時區(qū)域。瑞薩flash驅動程序RL78 RFD Type02用于對flash進行重新編程并執(zhí)行boot swapping。本次說明主要以RL78/F24為例展開boot s
    的頭像 發(fā)表于 02-26 09:25 ?2456次閱讀
    通過<b class='flag-5'>Boot</b> swap實現瑞薩RL78/F24 MCU固件升級