父工程中的xml配置文件,如何引用子模块中的application.xml属性文件,读取里面的属性
来源:2-22 基于通用Mapper基于Rest编写api接口-1
蓝色西西
2019-11-19 09:28:45
<generatorConfiguration>
<!--这两种,任意一种,都找不到文件-->
<properties resource="${maven.multiModuleProjectDirectory}/my-springboot-project-api/src/main/resources/application.yml"/>
<properties resource="application.yml"/>
<context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
<!--<property name="beginningDelimiter" value="`"/>-->
<!--<property name="endingDelimiter" value="`"/>-->
<!--<property name="beginningDelimiter" value='"'/>-->
<!--<property name="endingDelimiter" value='"'/>-->
<plugin type="tk.mybatis.mapper.generator.MapperPlugin">
<property name="mappers" value="com.mycompany.my.mapper.MyMapper"/>
</plugin>
<!--记得要在最上面写<properties resource="application.properties"/>下面的变量才会生效-->
<!--<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"-->
<!--connectionURL="jdbc:mysql://localhost:3306/worlds"-->
<!--userId="root"-->
<!--password="123">-->
<!--</jdbcConnection>-->
<!--记得要在最上面写<properties resource="application.properties"/>下面的变量才会生效-->
<jdbcConnection driverClass="${spring.datasource.driver-class-name}"
connectionURL="${spring.datasource.url}"
userId="${spring.datasource.username}"
password="${spring.datasource.password}">
</jdbcConnection>父工程中的xml配置文件,如何引用子模块中的application.xml属性文件,读取里面的属性。为啥下面两种设置总说找不到文件。
1回答
Java架构师讲师团
2019-11-19
逆向工程放到外部使用吧,耦合度太高了。一个逆向工具单独一个工程即可。没必要每个项目都整合进去,请按照老师的步骤去做吧
相似问题