Tag Archives: intellij idea

idea Error: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource

Error:

在这里插入图片描述
Error Message:

APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).


Solution:- [ ] List item
Just check the nacos port and change it to the port used by the project you are running.

[Solved] IDEA Maven Error: Cannot resolve xxx & Maven Dependencies Error

Prerequisites

Premise: Make sure the dependencies in Maven are correct, Don’t make mistakes such as missing letters.
If you are worried, you can go to the official website to search, and copy and paste it again.
Official website link: https://mvnrepository.com/

scene

Importing a new project,or other reasons,maven refresh is also useless, it reports error as show below:

Solution:

1. First, Clear the cache, Click and restart IDEA.

2. Close IDEA, Open the project folder

Find .idea in the project, delete workspace.xml

3. Re-open IDEA, find Maven on the right

Double-click clean

Wait for the console to appear BUILD SUCCESS

Find install under maven again, Double-click it and the download log shown below will appear.

Wait it over, and BUILD SUCCESS will appear:

Click the Reload button in the Maven component again, wait for the bottom progress bar to end

4. Solve the Dependencis report in Maven

First, Open the file pom.xml

Then delete the content in the tag dependencies [recommended to use Ctrl + x]

Click the Reload button in the Maven component again, wait for the bottom progress bar to finish. [dependencies disappears at this time]

Then in pom.xml, use the shortcut key Ctrl + z to return

(If you are using Ctrl + x , you can use Ctrl + v to paste)

Let the dependencies content appear again,return to the previous state.

The last step: click the Reload button in the Maven component again, wait for the bottom progress bar to finish. [At this time,dependencies appears and no longer reports an error]

Final effect:

Finally, it is solved.

Idea2021 reports an error. Default operand size is 64 sets the startup task to automatically add the registry

Problem background:

Idea with git will remind you of the following error
arbitrary: use of Rex. W is meaningless (default operand size is 64)
because there is security software, you need to add a key in the registry
Computer \ HKEY_ LOCAL_ Create a new [string value] HookApi under machine \ software \ Tec \ ocular. 3 \ agent \ config_ Dis INS, numerical data: 1
but it’s too troublesome to manually add and restart idea every time. Now it’s changed to automatically add registry configuration after startup

1. Find a directory and create two files, one regidea.bat and one regidea.log

As shown in Figure

2. Modify the bat file and enter the following instructions

(reg query HKEY_LOCAL_MACHINE\SOFTWARE\TEC\Ocular.3\agent\config /v hookapi_disins && (echo %date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2% reg exist... >>%~dp0\regIdea.log )) || ((reg add HKEY_LOCAL_MACHINE\SOFTWARE\TEC\Ocular.3\agent\config  /t REG_SZ /v hookapi_disins /d 1)&&(echo %date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2% reg set suc... >>%~dp0\regIdea.log ))

The main idea is to query whether there is a hook API in the registry_ Dis INS, set and print a line of text set suc… In regidea.log
If yes, print reg exist…
log file just to see if the instruction takes effect

3. Create a shortcut to the bat file and drag it into the following directory

C: \ users \ XXX \ appdata \ roaming \ Microsoft \ windows \ start menu \ programs \ startup
where XXX is the user name
if the directory cannot be found, check the view hidden item of the folder

Error:java: OutOfMemoryError: insufficient memory [How to Solve]

Troubleshooting: error: Java: outofmemoryerror: insufficient memory

1.idea

2. Desktop – my computer – the arrow in the upper left corner to the desktop – find the user folder – find xxx.vmoptions – config – change the size 3, restart the idea

Note:
you can’t find it on the Internet successfully. Record it.

[Error][IntelliJ IDEA] Element XXX is not allowed here

Questions

When using IntelliJ idea to build a project, errors such as element XXX is not allowed here are encountered in the XML file

For example, the following element resultmap is not allowed here error is encountered in the XML configuration file

resolvent

The configuration of the header of the XML file is wrong, and the names of the three places in the red box should be consistent

IntelliJ idea / eclipse automatically generate author annotation signature

The signature of the author’s comments is as follows:

/**
* @ author E-mail:[email protected]
* @ version created on June 20, 2016 at 04:58:52 PM*/

Eclipse automatically generates the author annotation signature
file

Window – & gt; preference – & gt; Java – & gt; code style – & gt; code template when you select this movie, you will see a box on the right showing the option of code. You can click this option, click New java files under it, and then you can click Edit button to change its content to yours: (for example)

${filecomment}
${package_ Declaration}
/ *
* @ author E-mail:[email protected]
* @ version creation time: ${date} ${time}
* /
${aspect}
${type}_ declaration}

Finally, apply — & gt; OK..

In addition, I need to add that there is a “insert variable” button in the bottom left foot of the edit window that pops up after I click Edit. When I click it, it will display the variables that can be referenced in the current template, so I won’t look for the definition of variables everywhere like I do.

IntelliJ idea ﹣ automatically generates author annotation signature

1. Open file — & gt; setting
2. Find editor — & gt; file and code templates
3. Find includes
4. Change ${user} to a user-defined user name

/**
* created by name on ${date}.
*/

Application of IntelliJ idea in Maven project pom.xml Add dependency


You can quickly add dependencies by using the shortcut Alt + Insert key at the location where you want to add them
The first feature allows you to search directly for the module name and then add it


The Dependency Template helps us generate the corresponding tags directly in the XML

We need to complete the information ourselves

Solve the problem of Chinese garbled code of actibpm plug-in in idea

Transfer: https://blog.csdn.net/weixin_46544994/article/details/106392705
Change the IDEA editor code to utf8File->; Settings-> Editor-> File Encodings, all changed to UTF-8

Idea64.exe. vmoptions and idea64.exe.vmoptions. Open and edit the two files and add the following code at the end of the text respectively

-Dfile.encoding=UTF-8


IDEA path Help->;
ea path Help->; Edit Custom VM Options